Sandys Posted December 14, 2021 Share Posted December 14, 2021 I got this code downloading some mod and I want that racing car elegy to replace here I replace once twice nothing happen I want to make cops use elegy and chase me in pursuits but they don't spawn sometimes it works where to correct it I just trying to figured this out I am totally new to coding // This file was decompiled using SASCM.ini published by Seemann (http://sannybuilder.com/files/SASCM.rar) on 13.10.2007 {$CLEO .cs} //-------------MAIN--------------- 0000: NOP 0001: wait 0 ms :Noname_6 0001: wait 1000 ms 077E: get_active_interior_to [email protected] 00D6: if and 010F: player $PLAYER_CHAR wanted_level > 5 0039: [email protected] == 0 004D: jf @Noname_6 0247: load_model #PATRIOT 0247: load_model #M4 0247: load_model #ARMY 038B: load_requested_models :Noname_58 0001: wait 300 ms 00D6: if and 0248: model #PATRIOT available 0248: model #M4 available 0248: model #ARMY available 004D: jf @Noname_58 0001: wait 0 ms 0209: [email protected] = random_int_in_ranges 50.0 100.0 0209: [email protected] = random_int_in_ranges 50.0 100.0 04C4: store_coords_to [email protected] [email protected] [email protected] from_actor $PLAYER_ACTOR with_offset [email protected] [email protected] 1.0 02C1: store_to [email protected] [email protected] [email protected] car_path_coords_closest_to [email protected] [email protected] [email protected] 00A5: [email protected] = create_car #ELEGY at [email protected] [email protected] [email protected] 0129: [email protected] = create_actor_pedtype 6 model #ARMY in_car [email protected] driverseat 01C8: [email protected] = create_actor_pedtype 6 model #ARMY in_car [email protected] passenger_seat 0 01C8: [email protected] = create_actor_pedtype 6 model #ARMY in_car [email protected] passenger_seat 1 01C8: [email protected] = create_actor_pedtype 6 model #ARMY in_car [email protected] passenger_seat 2 0223: set_actor [email protected] health_to 500 0223: set_actor [email protected] health_to 500 0223: set_actor [email protected] health_to 500 0223: set_actor [email protected] health_to 500 02E2: set_actor [email protected] weapon_accuracy_to 50 02E2: set_actor [email protected] weapon_accuracy_to 50 02E2: set_actor [email protected] weapon_accuracy_to 50 02E2: set_actor [email protected] weapon_accuracy_to 50 01B2: give_actor [email protected] weapon 31 ammo 99999 // Load the weapon model before using this 01B2: give_actor [email protected] weapon 31 ammo 99999 // Load the weapon model before using this 01B2: give_actor [email protected] weapon 31 ammo 99999 // Load the weapon model before using this 01B2: give_actor [email protected] weapon 31 ammo 99999 // Load the weapon model before using this 036A: put_actor [email protected] in_car [email protected] 0430: put_actor [email protected] into_car [email protected] passenger_seat 1 0430: put_actor [email protected] into_car [email protected] passenger_seat 2 0430: put_actor [email protected] into_car [email protected] passenger_seat 3 0423: set_car [email protected] improved_handling_to 2.0 // (float) 00AD: set_car [email protected] max_speed_to 50.0 00AF: set_car [email protected] driver_behaviour_to 4 00AE: set_car [email protected] traffic_behaviour_to 2 00D6: if 00DF: actor $PLAYER_ACTOR driving 004D: jf @Noname_599 03C0: [email protected] = actor $PLAYER_ACTOR car 0114: set_actor [email protected] weapon 31 ammo_to 200000 while_in_car 0114: set_actor [email protected] weapon 31 ammo_to 200000 while_in_car 0114: set_actor [email protected] weapon 31 ammo_to 200000 while_in_car 0713: actor [email protected] driveby_actor $PLAYER_ACTOR car -1 point 0.0 0.0 0.0 radius 5000.0 8 1 firing_rate 360 :Noname_520 0001: wait 0 ms 00D6: if 0205: actor $PLAYER_ACTOR near_car [email protected] radius 300.0 300.0 150.0 flag 0 004D: jf @Noname_1162 00D6: if 8119: not car [email protected] wrecked 004D: jf @Noname_1162 00D6: if 8118: not actor [email protected] dead 004D: jf @Noname_840 0002: jump @Noname_599 :Noname_599 0001: wait 0 ms 00AA: store_car [email protected] position_to [email protected] [email protected] [email protected] 00D6: if and 80DF: not actor $PLAYER_ACTOR driving 0205: actor $PLAYER_ACTOR near_car [email protected] radius 15.0 15.0 150.0 flag 0 004D: jf @Noname_520 0633: AS_actor [email protected] exit_car 0633: AS_actor [email protected] exit_car 0633: AS_actor [email protected] exit_car 0633: AS_actor [email protected] exit_car 05E2: AS_actor [email protected] kill_actor $PLAYER_ACTOR 05E2: AS_actor [email protected] kill_actor $PLAYER_ACTOR 05E2: AS_actor [email protected] kill_actor $PLAYER_ACTOR 05E2: AS_actor [email protected] kill_actor $PLAYER_ACTOR 0002: jump @Noname_952 :Noname_717 0001: wait 0 ms 00AA: store_car [email protected] position_to [email protected] [email protected] 1[email protected] 00D6: if and 80DF: not actor $PLAYER_ACTOR driving 0205: actor $PLAYER_ACTOR near_car [email protected] radius 15.0 15.0 150.0 flag 0 004D: jf @Noname_859 0164: disable_marker [email protected] 0633: AS_actor [email protected] exit_car 0633: AS_actor [email protected] exit_car 0633: AS_actor [email protected] exit_car 0633: AS_actor [email protected] exit_car 05E2: AS_actor [email protected] kill_actor $PLAYER_ACTOR 05E2: AS_actor [email protected] kill_actor $PLAYER_ACTOR 05E2: AS_actor [email protected] kill_actor $PLAYER_ACTOR 05E2: AS_actor [email protected] kill_actor $PLAYER_ACTOR 0002: jump @Noname_952 :Noname_840 0001: wait 0 ms 0676: AS_actor [email protected] in_car [email protected] move_from_passengerseat_to_driverseat 0002: jump @Noname_859 :Noname_859 0001: wait 0 ms 00AA: store_car [email protected] position_to [email protected] [email protected] [email protected] 00D6: if 0205: actor $PLAYER_ACTOR near_car [email protected] radius 300.0 300.0 150.0 flag 0 004D: jf @Noname_1162 00D6: if 8119: not car [email protected] wrecked 004D: jf @Noname_1162 00D6: if 8118: not actor [email protected] dead 004D: jf @Noname_1162 0002: jump @Noname_717 :Noname_952 0001: wait 0 ms 00D6: if 8118: not actor $PLAYER_ACTOR dead 004D: jf @Noname_1110 00D6: if and 00F2: actor [email protected] near_actor $PLAYER_ACTOR radius 100.0 100.0 0 00F2: actor [email protected] near_actor $PLAYER_ACTOR radius 100.0 100.0 0 00F2: actor [email protected] near_actor $PLAYER_ACTOR radius 100.0 100.0 0 00F2: actor [email protected] near_actor $PLAYER_ACTOR radius 100.0 100.0 0 004D: jf @Noname_1110 00D6: if and 0118: actor [email protected] dead 0118: actor [email protected] dead 0118: actor [email protected] dead 0118: actor [email protected] dead 004D: jf @Noname_952 00D6: if 0741: actor $PLAYER_ACTOR busted 004D: jf @Noname_952 :Noname_1110 0001: wait 0 ms 01C2: remove_references_to_actor [email protected] // Like turning an actor into a random pedestrian 01C2: remove_references_to_actor [email protected] // Like turning an actor into a random pedestrian 01C2: remove_references_to_actor [email protected] // Like turning an actor into a random pedestrian 01C2: remove_references_to_actor [email protected] // Like turning an actor into a random pedestrian 01C3: remove_references_to_car [email protected] // Like turning a car into any random car 0209: [email protected] = random_int_in_ranges 10000 20000 0001: wait [email protected] ms 0002: jump @Noname_6 :Noname_1162 0001: wait 0 ms 01C2: remove_references_to_actor [email protected] // Like turning an actor into a random pedestrian 01C2: remove_references_to_actor [email protected] // Like turning an actor into a random pedestrian 01C2: remove_references_to_actor [email protected] // Like turning an actor into a random pedestrian 01C2: remove_references_to_actor [email protected] // Like turning an actor into a random pedestrian 01C3: remove_references_to_car [email protected] // Like turning a car into any random car 0209: [email protected] = random_int_in_ranges 10000 20000 0001: wait [email protected] ms 0002: jump @Noname_6 thank you in advance I am waiting for your great help please Link to comment Share on other sites More sharing options...
OrionSR Posted December 14, 2021 Share Posted December 14, 2021 Replace both references to #PATRIOT with #ELEGY. You want to make sure that you request the model to be loaded, and then to wait until the model is loaded, before trying to create the vehicle. It could be that sometimes the Elegy was already loaded due to random traffic in the area, and that's why it occasionally works. Other than that... I'm not exactly sure what problems you are having. Link to comment Share on other sites More sharing options...
Sandys Posted December 26, 2021 Author Share Posted December 26, 2021 ty brother Link to comment Share on other sites More sharing options...