#1 Вопросы по скриптингу » Скрипт не работает с некоторым видом транспорта » 14-09-2014 17:39

perforator
Replies: 0
{$CLEO}
thread 'JEDICAR'
while true
    wait 0
    if and
        0AB0: key_pressed 104 //num 8
        player.Defined($PLAYER_CHAR)
    then
        04C4: store_coords_to 0@ 1@ 2@ from_actor $PLAYER_ACTOR with_offset 0.0 20.0 0.0 //1
        016f: create_particle 3 rotation_factor 0.0 size 10.0 intensity 150 flags 255 0 255 at 0@ 1@ 2@
        if and
            0AB0: key_pressed 103 //num 7
            not actor.Driving($PLAYER_ACTOR)
        then
            if
                0AE2: 3@ = random_vehicle_near_point 0@ 1@ 2@ in_radius 10.0 find_next 0 pass_wrecked 0
            then
                repeat
                    car.StorePos(3@, 5@, 6@, 7@)
                    0087: 8@ = 5@
                    0063: 8@ -= 0@
                    0087: 9@ = 6@
                    0063: 9@ -= 1@
                    0604: get_Z_angle_for_point 8@ 9@ store_to 10@
                    0175: set_car 3@ Z_angle_to 10@
                    06A2: get_car 3@ velocity_in_direction_XYZ 11@ 12@ 13@
                        if 
                            11@ < 0
                        then
                            11@ += -0.5
                        else
                            11@ += 0.5
                        end
                        if 
                            12@ < 0
                        then
                            12@ += -0.5
                        else
                            12@ += 0.5
                        end
                            13@ += 0.5  
                        07D5: set_car 3@ velocity_in_direction_XYZ 11@ 12@ 13@ rotation_velocitiesXY 0.0 0.0 unk 0.0
                until 8AE2: not 3@ = random_vehicle_near_point 0@ 1@ 2@ in_radius 10.0 find_next 1 pass_wrecked 0
            end
        end
    end
end

Суть при нажатии 7+8 num машины в сфере разлетаются куда подальше от центра этой сферы. Швыряются почему-то только пустые машины, мотоциклы и полицейские машины. У всех остальных машин - только меняет угол, но не швыряет. Почему?

ПС Если опкоды переделать на людей - то всё работает.

Board footer

Powered by FluxBB