You are not logged in.
Я вот подумал и решил попробовать на примере скрипта Yelmi написать скрипт который при включении мигалки давал бы эфект маргания фар, при этом для разнообразия маргание в 3 режимах: мегают все фары, беспорядочно и чередуясь, но воплотить в жизнь оказалось не так просто поэтому прошу помощи у профессионалов так как очень обьёмно получаеться...
Скрипт Yelmi если он не против - для примера.
// This file was decompiled using sascm.ini published by Seemann (http://sannybuilder.com/files/SASCM.rar) on 13.10.2007 {$VERSION 3.1.0027} {$CLEO .cs} //-------------MAIN--------------- 0000: NOP :NONAME_2 wait 0 if and Player.Defined($PLAYER_CHAR) $ONMISSION == 0 0AB0: key_pressed 84 else_jump @NONAME_2 if and Actor.Driving($PLAYER_ACTOR) 847A: not actor $PLAYER_ACTOR driving_bike 84A7: not actor $PLAYER_ACTOR driving_boat 84A9: not actor $PLAYER_ACTOR driving_heli not Actor.DrivingPlane($PLAYER_ACTOR) 84C8: not actor $PLAYER_ACTOR driving_flying_vehicle 89AE: not actor $PLAYER_ACTOR driving_train else_jump @NONAME_2 if and not Actor.DrivingVehicleType($PLAYER_ACTOR, #PIZZABOY) not Actor.DrivingVehicleType($PLAYER_ACTOR, #PCJ600) not Actor.DrivingVehicleType($PLAYER_ACTOR, #FAGGIO) not Actor.DrivingVehicleType($PLAYER_ACTOR, #FREEWAY) not Actor.DrivingVehicleType($PLAYER_ACTOR, #SANCHEZ) not Actor.DrivingVehicleType($PLAYER_ACTOR, #FCR900) not Actor.DrivingVehicleType($PLAYER_ACTOR, #NRG500) not Actor.DrivingVehicleType($PLAYER_ACTOR, #COPBIKE) else_jump @NONAME_2 if and not Actor.DrivingVehicleType($PLAYER_ACTOR, #BF400) not Actor.DrivingVehicleType($PLAYER_ACTOR, #WAYFARER) else_jump @NONAME_2 03C0: 0@ = actor $PLAYER_ACTOR car 067F: set_car 0@ lights 2 wait 750 :NONAME_201 wait 250 if Actor.Driving($PLAYER_ACTOR) else_jump @NONAME_429 0A97: 1@ = car 0@ struct 1@ += 1440 0494: get_joystick 0 data_to 10@ 11@ 12@ 13@ if -100 > 10@ else_jump @NONAME_334 0AA6: call_method 7086336 1@ num_params 2 pop 0 0 0 0AA6: call_method 7086336 1@ num_params 2 pop 0 1 1 wait 300 0AA6: call_method 7086336 1@ num_params 2 pop 0 1 0 :NONAME_334 if 10@ > 100 else_jump @NONAME_414 0AA6: call_method 7086336 1@ num_params 2 pop 0 1 0 0AA6: call_method 7086336 1@ num_params 2 pop 0 0 1 wait 300 0AA6: call_method 7086336 1@ num_params 2 pop 0 1 1 :NONAME_414 if 0AB0: key_pressed 84 else_jump @NONAME_201 :NONAME_429 0AA6: call_method 7086336 1@ num_params 2 pop 0 0 0 0AA6: call_method 7086336 1@ num_params 2 pop 0 0 1 067F: set_car 0@ lights 0 wait 1000 jump @NONAME_2
Last edited by Seemann (13-08-2008 10:13)
Offline
Скрипт нашол, но раздражает то что машина абсолютно не ломаеться при ударах... Может кто поможет испарвить? Я тока по краям почистил но этого явно недостаточно.
// This file was decompiled using sascm.ini published by Seemann (http://sannybuilder.com/files/SASCM.rar) on 13.10.2007 {$VERSION 3.1.0027} {$CLEO .cs} //-------------MAIN--------------- 0000: NOP 014B: $MODCOPCAR = init_parked_car_generator #COPCARLA color -1 -1 1 alarm 0 door_lock 0 0 10000 at 2436.479 -1636.828 13.0112 angle 153.9109 014C: set_parked_car_generator $MODCOPCAR cars_to_generate_to 1 $SPECIALFLASHON = 1 $SPECIALFLASHTYPE = 0 $LIGHTS_CHANGE_TIME_LEVEL = 0 $BACKJUMPMODE1 = 0 $BACKJUMPMODE2 = 0 :NONAME_87 wait 10 if and Actor.Driving($PLAYER_ACTOR) Actor.DrivingPoliceVehicle($PLAYER_ACTOR) 00E1: player $PLAYER_CHAR pressed_key 19 else_jump @NONAME_87 wait 250 03C0: $ACTIVE_COP_CAR = actor $PLAYER_ACTOR car 0397: enable_car $ACTIVE_COP_CAR siren 1 wait 100 :NONAME_143 073C: car $ACTIVE_COP_CAR damage_component 7 // versionB $BACKJUMPMODE1 = 0 jump @NONAME_283 :NONAME_164 073C: car $ACTIVE_COP_CAR damage_component 6 // versionB $BACKJUMPMODE1 = 1 jump @NONAME_283 :NONAME_185 073C: car $ACTIVE_COP_CAR damage_component 7 // versionB $BACKJUMPMODE1 = 2 jump @NONAME_283 :NONAME_206 073C: car $ACTIVE_COP_CAR damage_component 6 // versionB $BACKJUMPMODE1 = 3 jump @NONAME_283 :NONAME_227 $BACKJUMPMODE1 = 4 jump @NONAME_283 :NONAME_241 067F: set_car $ACTIVE_COP_CAR lights 1 $BACKJUMPMODE2 = 0 jump @NONAME_568 :NONAME_262 067F: set_car $ACTIVE_COP_CAR lights 2 $BACKJUMPMODE2 = 1 jump @NONAME_568 :NONAME_283 0397: enable_car $ACTIVE_COP_CAR siren 1 067F: set_car $ACTIVE_COP_CAR lights 2 if not Car.Wrecked($ACTIVE_COP_CAR) else_jump @NONAME_87 if 80E1: not player $PLAYER_CHAR pressed_key 19 else_jump @NONAME_893 if 80E1: not player $PLAYER_CHAR pressed_key 18 else_jump @NONAME_241 0397: enable_car $ACTIVE_COP_CAR siren 1 gosub @NONAME_744 if $LIGHTS_CHANGE_TIME_LEVEL == 0 else_jump @NONAME_385 wait 100 :NONAME_385 if $LIGHTS_CHANGE_TIME_LEVEL == 1 else_jump @NONAME_408 wait 200 :NONAME_408 if $LIGHTS_CHANGE_TIME_LEVEL == 2 else_jump @NONAME_431 wait 300 :NONAME_431 0A30: repair_car $ACTIVE_COP_CAR if $BACKJUMPMODE1 == 0 else_jump @NONAME_461 jump @NONAME_164 :NONAME_461 if $BACKJUMPMODE1 == 1 else_jump @NONAME_486 jump @NONAME_185 :NONAME_486 if $BACKJUMPMODE1 == 2 else_jump @NONAME_511 jump @NONAME_206 :NONAME_511 if $BACKJUMPMODE1 == 3 else_jump @NONAME_536 jump @NONAME_227 :NONAME_536 if $BACKJUMPMODE1 == 4 else_jump @NONAME_561 jump @NONAME_143 :NONAME_561 jump @NONAME_143 :NONAME_568 0397: enable_car $ACTIVE_COP_CAR siren 1 if not Car.Wrecked($ACTIVE_COP_CAR) else_jump @NONAME_87 if 00E1: player $PLAYER_CHAR pressed_key 18 else_jump @NONAME_143 0A30: repair_car $ACTIVE_COP_CAR gosub @NONAME_744 0397: enable_car $ACTIVE_COP_CAR siren 1 if $LIGHTS_CHANGE_TIME_LEVEL == 0 else_jump @NONAME_650 wait 50 :NONAME_650 if $LIGHTS_CHANGE_TIME_LEVEL == 1 else_jump @NONAME_672 wait 80 :NONAME_672 if $LIGHTS_CHANGE_TIME_LEVEL == 2 else_jump @NONAME_694 wait 100 :NONAME_694 if $BACKJUMPMODE2 == 0 else_jump @NONAME_719 jump @NONAME_262 :NONAME_719 if $BACKJUMPMODE2 == 1 else_jump @NONAME_744 jump @NONAME_241 :NONAME_744 if $SPECIALFLASHON == 1 else_jump @NONAME_891 0407: store_coords_to $THEX $THEY $THEZ from_car $ACTIVE_COP_CAR with_offset 0.0 0.0 0.0 if $SPECIALFLASHTYPE == 0 else_jump @NONAME_841 09E5: create_flash_light_at $THEX $THEY $THEZ RGB_mask 190 15 5 radius 20.0 $SPECIALFLASHTYPE = 1 return :NONAME_841 if $SPECIALFLASHTYPE == 1 else_jump @NONAME_891 09E5: create_flash_light_at $THEX $THEY $THEZ RGB_mask 66 60 196 radius 20.0 $SPECIALFLASHTYPE = 0 return :NONAME_891 return :NONAME_893 0A30: repair_car $ACTIVE_COP_CAR 0397: enable_car $ACTIVE_COP_CAR siren 0 00C1: $CURRENTTIME = get_minutes_left_to_time_hours $CURRENTTIME_HOUR time_minutes $CURRENTTIME_MINUTE if and not 5 > $CURRENTTIME_HOUR 21 >= $CURRENTTIME_HOUR else_jump @NONAME_960 067F: set_car $ACTIVE_COP_CAR lights 1 wait 250 jump @NONAME_87 :NONAME_960 067F: set_car $ACTIVE_COP_CAR lights 2 wait 250 jump @NONAME_87 0A93: end_custom_thread
Прошу заключать большие куски кода в тэг [cоde]. Seemann
Last edited by Seemann (13-08-2008 10:13)
Offline
Ну опять двадцать пять. Замени все глобальные переменные на локальные(кроме $PLAYER_ACTOR)
014C: set_parked_car_generator $MODCOPCAR cars_to_generate_to 1
Почему 1?
$SPECIALFLASHTYPE = 0
Когда заменишь это локальными переменными, то инициализация в ноль будет не нужна
Offline