Jump to content

S.O.S need help... Spawn car with cleo


neten

Recommended Posts

how can i spawn a car in XYZ place.. by using CLEO "?

 

pls write the code dontgetit.gif

this should work this same opcode who work in main.scm;]

Link to comment
Share on other sites

like that?

 

 

{$CLEO .cs}:TestObject014B: $tower_hotdog = init_parked_car_generator 588 -1 -1 1 alarm 0 door_lock 0 0 10000 at 1555.183 -1352.873 329.4553 angle 90.00A93: end_custom_thread

 

Link to comment
Share on other sites

like that?

 

 

{$CLEO .cs}:TestObject014B: $tower_hotdog = init_parked_car_generator 588 -1 -1 1 alarm 0 door_lock 0 0 10000 at 1555.183 -1352.873 329.4553 angle 90.00A93: end_custom_thread

 

its not this opcode its must be like this:

 

 

{$VERSION 3.1.0023}{$CLEO .cs}//-------------MAIN---------------0000: NOP :CAR_103A4: name_thread 'CAR':CAR_2014B: $FANGTACAR = init_parked_car_generator #ELEGY color -1 -1  1 alarm  0 door_lock  0  0  10000 at  2494.424 -1706.357  7.159871 angle  0.0 014C: set_parked_car_generator $FANGTACAR cars_to_generate_to  101 

 

Link to comment
Share on other sites

Car spawns crash with CLEO as it uses Global variables, you have to add spawns into the main or you have to do a longer more complex code to spawn vehicles.

I will post it up later when at home.

Link to comment
Share on other sites

P.I.M.P:from your code my san andreas crashing sad.gifsad.gif i not modify your code(coordinats,car..)please give working code colgate.gif (sorry to my english biggrin.gif )

Link to comment
Share on other sites

  • 2 months later...

 

Car spawns crash with CLEO as it uses Global variables, you have to add spawns into the main or you have to do a longer more complex code to spawn vehicles.

I will post it up later when at home.

wtf you talking about? i have made 20+ working car spawns with cleo. Here, a complete version of one of my scripts:

 

 

{$VERSION 3.1.0027}{$CLEO .cs}//-------------MAIN---------------014B: 0@ = init_parked_car_generator #HOTRING color -1 -1 1 alarm 0 door_lock 0 0 10000 at -2335.069 -1613.274 483.7184 angle 0.0 014C: set_parked_car_generator 0@ cars_to_generate_to 101 0A93: end_custom_thread 

 

Edited by james227uk
Link to comment
Share on other sites

gtasbigfoot

 

014B: 0@ = init_parked_car_generator #nrg500 color -1 -1 1 alarm 0 door_lock 0 0 10000 at cods go here angle 0.0 014C: set_parked_car_generator 0@ cars_to_generate_to 101 0A93: end_custom_thread

 

 

put the cars remains

 

 

 

0A95: enable_thread_saving

 

 

 

car spawns do work with cleo. cleo uses

local variables

 

so dont use Globals.

Edited by gtasbigfoot
Link to comment
Share on other sites

press keys 1 and 2 to sitch on the carspwner

press forward/backward to switch from model to model

press Enter or Look Behind to confirm and exit

 

 

spawn in interior is also possible

 

 

{$CLEO .cs}:Carspawn_0003A4: name_thread 'CAR'0209: 4@ = random_int  0  60871: init_jump_table 4@ total_jumps  7  0 @Carspawn_01 jumps  0 @Carspawn_01  1 @Carspawn_02  2 @Carspawn_03  3 @Carspawn_04  4 @Carspawn_05  5 @Carspawn_06 6 @Carspawn_08:Carspawn_010209: 5@ = random_int  533  5360002: jump @Carspawn_1:Carspawn_020209: 5@ = random_int  565  5670002: jump @Carspawn_1:Carspawn_030209: 5@ = random_int  575  5760002: jump @Carspawn_1:Carspawn_040209: 5@ = random_int  409  4120002: jump @Carspawn_1:Carspawn_050209: 5@ = random_int  502  5080002: jump @Carspawn_1:Carspawn_060209: 5@ = random_int  400  4020002: jump @Carspawn_1:Carspawn_070209: 5@ = random_int  494  4960002: jump @Carspawn_1:Carspawn_080209: 5@ = random_int  558  5620002: jump @Carspawn_1:Carspawn_10001: wait 0 ms 00D6: if 0256:   player $PLAYER_CHAR defined 004D: jump_if_false @Carspawn_1 if  and03EE:   player $PLAYER_CHAR controllable  80DF:   NOT   actor $PLAYER_ACTOR driving 004D: jump_if_false @Carspawn_1if0AB0:   key_pressed 49  004D: jump_if_false @Carspawn_20006: 3@ =  1  // integer values0006: 33@ =  0  // integer values:Carspawn_2if  and0039:   3@ ==  1  // integer values0AB0:   key_pressed 50  004D: jump_if_false @Carspawn_30006: 3@ =  0  // integer values0002: jump @Carspawn_4:Carspawn_3if0039:   3@ ==  1  // integer values  004D: jump_if_false @Carspawn_1if0019:   33@ >  5000  // integer values  004D: jump_if_false @Carspawn_10006: 3@ =  0  // integer values0002: jump @Carspawn_1:Carspawn_40512: permanent_text_box 'TATTA'04D7: lock_actor $PLAYER_ACTOR in_current_position 102AB: set_actor $PLAYER_ACTOR immunities  1  1  1  1  101B4: set_player $PLAYER_CHAR frozen_state  0 (frozen)0002: jump @Carspawn_114:Carspawn_50001: wait  0 ms00D6: if 00256: player $PLAYER_CHAR defined004D: jump_if_false @Carspawn_600D6: if  08119:   NOT   car 1@ wrecked004D: jump_if_false @Carspawn_603F0: text_draw_toggle  1033F: set_text_draw_letter_width_height 1.0 3.8045A: text_draw_1number  50.0  150.0 'NUMBER' 5@    // value00D6: if  2100E1:   key_pressed  0  1600E1:   key_pressed  0  15004D: jump_if_false @Carspawn_7:Carspawn_601B4: set_player $PLAYER_CHAR frozen_state  1 (unfrozen)02AB: set_actor $PLAYER_ACTOR immunities  0  0  0  0  004D7: lock_actor $PLAYER_ACTOR in_current_position 001C3: remove_references_to_car 1@  // Like turning a car into any random car03F0: text_draw_toggle  003E6: remove_text_box0001: wait  250 ms0002: jump @Carspawn_1:Carspawn_700D6: if  000E1:   key_pressed  0  1004D: jump_if_false @Carspawn_50002: jump @Carspawn_11:Carspawn_110494: get_joystick_data  0 26@ 27@ 28@ 29@00D6: if 00039:   27@ ==  0  // integer values004D: jump_if_false @Carspawn_120002: jump @Carspawn_14:Carspawn_1200D6: if 0 0019:   27@ >  0  // integer values004D: jump_if_false @Carspawn_13000E: 5@ -=  1  // integer values0002: jump @Carspawn_14:Carspawn_1300D6: if 0 001B:    0 > 27@  // integer values004D: jump_if_false @Carspawn_14000A: 5@ +=  1  // integer values0002: jump @Carspawn_14:Carspawn_1400D6: if  0001B:    400 > 5@  // integer values004D: jump_if_false @Carspawn_1120006: 5@ =  611  // integer values:Carspawn_11200D6: if  00019:   5@ >  611  // integer values004D: jump_if_false @Carspawn_1130006: 5@ =  400  // integer values:Carspawn_11300A6: destroy_car 1@:Carspawn_1140247: request_model 5@:Carspawn_4030001: wait  0 ms00D6: if  00248:   model 5@ available004D: jump_if_false @Carspawn_40304C4: create_coordinate 11@ 12@ 13@ from_actor $PLAYER_ACTOR offset 0.0 5.5  0.3 0172: 2@ = actor $PLAYER_ACTOR z_angle000B: 2@ +=  270.0  // floating-point values00A5: 1@ = create_car 5@ at 11@ 12@ 13@0175: set_car 1@ z_angle_to  2@0249: release_model 5@077E: get_active_interior_to 9@00D6: if  08039:   NOT   9@ ==  0  // integer values004D: jump_if_false @Carspawn_4050840: link_car 1@ to_interior 9@:Carspawn_40503F0: text_draw_toggle  10001: wait  50 ms03F0: text_draw_toggle  00001: wait  50 ms033F: set_text_draw_letter_width_height 1.0 3.8045A: text_draw_1number  50.0  150.0 'NUMBER' 5@    // value0001: wait  500 ms0002: jump @Carspawn_5

 

Link to comment
Share on other sites

gtasbigfoot

 

press keys 1 and 2 to sitch on the carspwner

press forward/backward to switch from model to model

press Enter or Look Behind to confirm and exit

 

 

spawn in interior is also possible

 

 

{$CLEO .cs}:Carspawn_0003A4: name_thread 'CAR'0209: 4@ = random_int  0  60871: init_jump_table 4@ total_jumps  7  0 @Carspawn_01 jumps  0 @Carspawn_01  1 @Carspawn_02  2 @Carspawn_03  3 @Carspawn_04  4 @Carspawn_05  5 @Carspawn_06 6 @Carspawn_08:Carspawn_010209: 5@ = random_int  533  5360002: jump @Carspawn_1:Carspawn_020209: 5@ = random_int  565  5670002: jump @Carspawn_1:Carspawn_030209: 5@ = random_int  575  5760002: jump @Carspawn_1:Carspawn_040209: 5@ = random_int  409  4120002: jump @Carspawn_1:Carspawn_050209: 5@ = random_int  502  5080002: jump @Carspawn_1:Carspawn_060209: 5@ = random_int  400  4020002: jump @Carspawn_1:Carspawn_070209: 5@ = random_int  494  4960002: jump @Carspawn_1:Carspawn_080209: 5@ = random_int  558  5620002: jump @Carspawn_1:Carspawn_10001: wait 0 ms 00D6: if 0256:   player $PLAYER_CHAR defined 004D: jump_if_false @Carspawn_1 if  and03EE:   player $PLAYER_CHAR controllable  80DF:   NOT   actor $PLAYER_ACTOR driving 004D: jump_if_false @Carspawn_1if0AB0:   key_pressed 49  004D: jump_if_false @Carspawn_20006: 3@ =  1  // integer values0006: 33@ =  0  // integer values:Carspawn_2if  and0039:   3@ ==  1  // integer values0AB0:   key_pressed 50  004D: jump_if_false @Carspawn_30006: 3@ =  0  // integer values0002: jump @Carspawn_4:Carspawn_3if0039:   3@ ==  1  // integer values  004D: jump_if_false @Carspawn_1if0019:   33@ >  5000  // integer values  004D: jump_if_false @Carspawn_10006: 3@ =  0  // integer values0002: jump @Carspawn_1:Carspawn_40512: permanent_text_box 'TATTA'04D7: lock_actor $PLAYER_ACTOR in_current_position 102AB: set_actor $PLAYER_ACTOR immunities  1  1  1  1  101B4: set_player $PLAYER_CHAR frozen_state  0 (frozen)0002: jump @Carspawn_114:Carspawn_50001: wait  0 ms00D6: if 00256: player $PLAYER_CHAR defined004D: jump_if_false @Carspawn_600D6: if  08119:   NOT   car 1@ wrecked004D: jump_if_false @Carspawn_603F0: text_draw_toggle  1033F: set_text_draw_letter_width_height 1.0 3.8045A: text_draw_1number  50.0  150.0 'NUMBER' 5@    // value00D6: if  2100E1:   key_pressed  0  1600E1:   key_pressed  0  15004D: jump_if_false @Carspawn_7:Carspawn_601B4: set_player $PLAYER_CHAR frozen_state  1 (unfrozen)02AB: set_actor $PLAYER_ACTOR immunities  0  0  0  0  004D7: lock_actor $PLAYER_ACTOR in_current_position 001C3: remove_references_to_car 1@  // Like turning a car into any random car03F0: text_draw_toggle  003E6: remove_text_box0001: wait  250 ms0002: jump @Carspawn_1:Carspawn_700D6: if  000E1:   key_pressed  0  1004D: jump_if_false @Carspawn_50002: jump @Carspawn_11:Carspawn_110494: get_joystick_data  0 26@ 27@ 28@ 29@00D6: if 00039:   27@ ==  0  // integer values004D: jump_if_false @Carspawn_120002: jump @Carspawn_14:Carspawn_1200D6: if 0 0019:   27@ >  0  // integer values004D: jump_if_false @Carspawn_13000E: 5@ -=  1  // integer values0002: jump @Carspawn_14:Carspawn_1300D6: if 0 001B:    0 > 27@  // integer values004D: jump_if_false @Carspawn_14000A: 5@ +=  1  // integer values0002: jump @Carspawn_14:Carspawn_1400D6: if  0001B:    400 > 5@  // integer values004D: jump_if_false @Carspawn_1120006: 5@ =  611  // integer values:Carspawn_11200D6: if  00019:   5@ >  611  // integer values004D: jump_if_false @Carspawn_1130006: 5@ =  400  // integer values:Carspawn_11300A6: destroy_car 1@:Carspawn_1140247: request_model 5@:Carspawn_4030001: wait  0 ms00D6: if  00248:   model 5@ available004D: jump_if_false @Carspawn_40304C4: create_coordinate 11@ 12@ 13@ from_actor $PLAYER_ACTOR offset 0.0 5.5  0.3 0172: 2@ = actor $PLAYER_ACTOR z_angle000B: 2@ +=  270.0  // floating-point values00A5: 1@ = create_car 5@ at 11@ 12@ 13@0175: set_car 1@ z_angle_to  2@0249: release_model 5@077E: get_active_interior_to 9@00D6: if  08039:   NOT   9@ ==  0  // integer values004D: jump_if_false @Carspawn_4050840: link_car 1@ to_interior 9@:Carspawn_40503F0: text_draw_toggle  10001: wait  50 ms03F0: text_draw_toggle  00001: wait  50 ms033F: set_text_draw_letter_width_height 1.0 3.8045A: text_draw_1number  50.0  150.0 'NUMBER' 5@    // value0001: wait  500 ms0002: jump @Carspawn_5

 

is there anything you can't do

is is very handy for me for geting around the woods quickly!

Edited by gtasbigfoot
Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
  • 1 User Currently Viewing
    0 members, 0 Anonymous, 1 Guest

×
×
  • Create New...

Important Information

By using GTAForums.com, you agree to our Terms of Use and Privacy Policy.