Quantcast
Jump to content
Search In
  • More options...
Find results that contain...
Find results in...
    1. Welcome to GTAForums!

    1. GTANet.com

    1. GTA Online

      1. The Diamond Casino Heist
      2. Find Lobbies & Players
      3. Guides & Strategies
      4. Vehicles
      5. Content Creator
      6. Help & Support
    2. Red Dead Online

      1. Frontier Pursuits
      2. Find Lobbies & Outlaws
      3. Help & Support
    3. Crews

    1. Red Dead Redemption 2

      1. PC
      2. Gameplay
      3. Missions
      4. Help & Support
    2. Red Dead Redemption

    1. Grand Theft Auto Series

    2. GTA 6

      1. St Andrews Cathedral
    3. GTA V

      1. PC
      2. Guides & Strategies
      3. Help & Support
    4. GTA IV

      1. The Lost and Damned
      2. The Ballad of Gay Tony
      3. Guides & Strategies
      4. Help & Support
    5. GTA Chinatown Wars

    6. GTA Vice City Stories

    7. GTA Liberty City Stories

    8. GTA San Andreas

      1. Guides & Strategies
      2. Help & Support
    9. GTA Vice City

      1. Guides & Strategies
      2. Help & Support
    10. GTA III

      1. Guides & Strategies
      2. Help & Support
    11. Top Down Games

      1. GTA Advance
      2. GTA 2
      3. GTA
    1. GTA Mods

      1. GTA V
      2. GTA IV
      3. GTA III, VC & SA
      4. Tutorials
    2. Red Dead Mods

      1. Documentation
    3. Mod Showroom

      1. Scripts & Plugins
      2. Maps
      3. Total Conversions
      4. Vehicles
      5. Textures
      6. Characters
      7. Tools
      8. Other
      9. Workshop
    4. Featured Mods

      1. DYOM
      2. OpenIV
      3. GTA: Underground
      4. GTA: Liberty City
      5. GTA: State of Liberty
    1. Rockstar Games

    2. Rockstar Collectors

    1. Off-Topic

      1. General Chat
      2. Gaming
      3. Technology
      4. Movies & TV
      5. Music
      6. Sports
      7. Vehicles
    2. Expression

      1. Graphics / Visual Arts
      2. GFX Requests & Tutorials
      3. Writers' Discussion
      4. Debates & Discussion
    3. Gangs

    1. Announcements

    2. Support

    3. Suggestions

Sign in to follow this  
gtafan113

Help with Script

Recommended Posts

gtafan113

I am very new to scripting, and I am trying to make a mission. For now I just want to get one part of it to work. Once I can do that successfully, the rest should be pretty easy.

 

Right now, my goal is, you walk into the marker behind Wang Autos and a mission starts. A Leviathan appears with a blue marker over it and you have to get in it. Once you get in it, you pass the mission.

 

I have 2 scripts, the starter one and the actual mission. Whenever I walk into the marker to start the mission it crashes and I don't know why.

 

Starter Script:

 

{$VERSION 3.1.0023}{$CLEO .cs}//-------------MAIN---------------03A4: name_thread 'CARSRT' :CARSRT_110001: wait 0 ms 00D6: if and0038:   $ONMISSION == 0 00EC:   actor $PLAYER_ACTOR 0 near_point -1936.56 273.2401 radius 80.0 80.0 004D: jump_if_false @CARSRT_11 00D6: if 00FE:   actor $PLAYER_ACTOR sphere 1 in_sphere -1936.56 273.2401 41.0469 radius 2.0 2.0 2.0 004D: jump_if_false @CARSRT_11 0038:   $ONMISSION == 1 0A94: start_custom_mission "CARDELIVERY"  

 

 

Mission Script:

 

{$VERSION 3.1.0023}{$CLEO .cm}//-------------MAIN---------------004F: create_thread 'NONAME' 03A4: name_thread 'NONAME' 0001: wait 0 ms 0180: set_on_mission_flag_to $ONMISSION // Note: your missions have to use the variable defined here 00D6: if 0112:   wasted_or_busted // mission only 004D: jump_if_false @NONAME_52 0002: jump @NONAME_226 :NONAME_520001: wait 0 ms 0247: load_model #LEVIATHN 038B: load_requested_models 0002: jump @NONAME_70 :NONAME_7000D6: if 8248:   not model #LEVIATHN available 004D: jump_if_false @NONAME_70 0001: wait 0 ms 0002: jump @NONAME_97 :NONAME_970001: wait 0 ms 00A5: $LEVIATHN = create_car #LEVIATHN at -1925.675 242.1439 41.0391 0175: set_car $LEVIATHN Z_angle_to 270.0 0224: set_car $LEVIATHN health_to 1000 0186: $M2 = create_marker_above_car $LEVIATHN 0165: set_marker $M2 color_to 2 0002: jump @NONAME_164 :NONAME_1640001: wait 0 ms 00DD:   actor $PLAYER_ACTOR driving_car_with_model $LEVIATHN 004D: jump_if_false @NONAME_164 0164: disable_marker $M2 0394: play_music 1 01E3: show_text_1number_styled GXT 'M_PASS' number 10000 time 5000 style 1  // MISSION PASSED!~n~~w~$~1~0109: player $PLAYER_CHAR money += 10000 0002: jump @NONAME_253 :NONAME_2260001: wait 0 ms 00BA: show_text_styled GXT 'M_FAIL' time 5000 style 1  // ~r~MISSION FAILED!0002: jump @NONAME_253 :NONAME_2530249: release_model #LEVIATHN 004E: end_thread 

 

Share this post


Link to post
Share on other sites
Kriskers

Troubleshooting questions go under SA troubleshooting, geez.. isnt the message coming to you, guys???

Share this post


Link to post
Share on other sites
TheSiggi

 

Troubleshooting questions go under SA troubleshooting, geez.. isnt the message coming to you, guys???

this is the section for III coding questions jeez...got it?

Edited by The_Siggi

Share this post


Link to post
Share on other sites
Kriskers

damn n00b!!! this is not a TROUBLESHOOTING section jeez...got it?

 

He says that his game is crashing and why, thats enough to say that this isnt a troubleshooting section!

Share this post


Link to post
Share on other sites
TheSiggi

guess why jerk!

 

because theres a mistake in his script! thats unbeliveable facedesk.gif

 

@ topic:

 

 

0180: set_on_mission_flag_to $ONMISSION // Note: your missions have to use the variable defined here 

 

not necessary

 

 

your structure of the .cm is wrong:

 

a mission is scripted that way:

 

 

 

{$CLEO .cm}:MyMission thread "MyMission" gosub @MissionStart if  wasted_or_busted then  gosub @MissionFailed end gosub @MissionCleanup end_thread :MissionStart // put the content of the mission here // when the stuff is done the script will go over to the passed thingy gosub @MissionPassed return :MissionPassedwait 500 01E3: text_1number_styled 'M_PASSD' 0 5000 ms 1 // MISSION PASSED! return :MissionFailed 00BA: text_styled 'M_FAIL' 5000 ms 1 // ~r~MISSION FAILED! return :MissionCleanup $ONMISSION = 0 // integer values mission_cleanup return 

 

Share this post


Link to post
Share on other sites
james227uk

 

damn n00b!!! this is not a TROUBLESHOOTING section jeez...got it?

 

He says that his game is crashing and why, thats enough to say that this isnt a troubleshooting section!

damn n00b!!! This is a troubleshooting section. You post for HELP here with scripts you have made! The Troubleshooting section is for UNMODIFIED versions of the game. Get it? Siggi is a regular around here and knows what belongs in this section.

Share this post


Link to post
Share on other sites
ZAZ

 

damn n00b!!! this is not a TROUBLESHOOTING section jeez...got it?

He says that his game is crashing and why, thats enough to say that this isnt a troubleshooting section!

Have you eyes? he posted a script

 

 

 

I am very new to scripting, and I am trying to make a mission. For now I just want to get one part of it to work. Once I can do that successfully, the rest should be pretty easy.

 

Right now, my goal is, you walk into the marker behind Wang Autos and a mission starts. A Leviathan appears with a blue marker over it and you have to get in it. Once you get in it, you pass the mission.

 

I have 2 scripts, the starter one and the actual mission. Whenever I walk into the marker to start the mission it crashes and I don't know why.

 

as Siggi wrote, close the starter thread

and opcode 0180: should be placed in main.scm

0180: set_on_mission_flag_to $ONMISSION

 

look below for the working scripts

 

{$CLEO .cs}:CARDELM_Start_103A4: name_thread 'TSTM':CARDELM_Start_20001: wait  0 msif0256:   player $PLAYER_CHAR defined004D: jump_if_false @CARDELM_Start_2if and0038:   $ONMISSION ==  0  // integer values00EC:   actor $PLAYER_ACTOR 0 near_point -1936.56 273.2401 radius 80.0 80.0004D: jump_if_false @CARDELM_Start_2:CARDELM_Start_6if00FE:   actor $PLAYER_ACTOR  1 (in-sphere)near_point -1936.56 273.2401 41.0469 radius 2.0 2.0 2.0004D: jump_if_false @CARDELM_Start_200BA: text_styled 'fem_on'  500 ms  40001: wait  500 ms0004: $ONMISSION =  1  // integer values0A94: start_custom_mission "CARDELIVERY"0002: jump @CARDELM_Start_2

 

 

 

 

this script must be named CARDELIVERY.cm

 

{$CLEO .cm}:CARDELIVERY03A4: name_thread "CARDEL"  0050: gosub @CARDELIVERY_main_1 if0112:   wasted_or_busted004D: jump_if_false @CARDELIVERY_end_10050: gosub @CARDELIVERY_fail_1                    :CARDELIVERY_end_10050: gosub @CARDELIVERY_clep_1004E: end_thread:CARDELIVERY_main_10317: increment_mission_attempts//here starts the missionscript0004: $ONMISSION =  100BA: text_styled 'fem_ok'  500 ms  40247: load_model #LEVIATHN:CARDELIVERY_m20001: wait 0 ms00D6: if0248:   model #LEVIATHN available004D: jump_if_false @CARDELIVERY_m200A5: [email protected] = create_car #LEVIATHN at -1925.675 242.1439 41.03910175: set_car [email protected] Z_angle_to 270.00224: set_car [email protected] health_to 10000186: [email protected] = create_marker_above_car [email protected]: set_marker [email protected] color_to 2:CARDELIVERY_m30001: wait 0 msif  and8119:   not   car [email protected] wrecked0202:   actor $PLAYER_ACTOR near_car [email protected] radius  90.0  90.0 unknown  0004D: jump_if_false @CARDELIVERY_fail_1 if00DB:   actor $PLAYER_ACTOR in_car [email protected] 004D: jump_if_false @CARDELIVERY_m3jump @CARDELIVERY_pass_1:CARDELIVERY_pass_10394: play_music 100BA: text_styled 'M_PASS'  5000 ms  10109: player $PLAYER_CHAR money += 100000051: return:CARDELIVERY_fail_100BA: text_styled 'M_FAIL'  5000 ms  10051: return:CARDELIVERY_clep_10164: disable_marker [email protected]: remove_references_to_car [email protected]: $ONMISSION =  000D8: mission_cleanup0051: return

 

Share this post


Link to post
Share on other sites
gtafan113

Thank you all of you, I will try what you guys said. smile.gif

Share this post


Link to post
Share on other sites
gtafan113

I had the mission working, and I had the below model with everything besides the parts that mention the DFT. Now, when I play the mission, the markers don't appear and as soon as I get in the first car, it starts a new game. I have no idea how me adding a DFT could have messed it up...

 

 

 

{$VERSION 3.1.0023}{$CLEO .cm}//-------------MAIN---------------:CARDEL03A4: name_thread "CARDEL" 0050: gosub @CARDEL_46 00D6: if 0112:   wasted_or_busted // mission only 004D: jump_if_false @CARDEL_37 0050: gosub @CARDEL_796 :CARDEL_370050: gosub @CARDEL_814 004E: end_thread :CARDEL_460317: increment_mission_attempts 0004: $ONMISSION = 1 00BC: show_text_highpriority GXT 'TM002' time 5000 flag 6 0247: load_model #LEVIATHN 0247: load_model #ZR350 0247: load_model #DFT30 038B: load_requested_models :CARDEL_8800D6: if 8248:   not model #LEVIATHN available 004D: jump_if_false @CARDEL_115 0001: wait 0 ms 0002: jump @CARDEL_88 :CARDEL_11500A5: [email protected] = create_car #LEVIATHN at -2026.62 138.0813 28.8359 0175: set_car [email protected] Z_angle_to 181.0849 0224: set_car [email protected] health_to 1000 020A: set_car [email protected] door_status_to 1 02AC: set_car [email protected] immunities BP 0 FP 0 EP 0 CP 0 MP 0 0519: toggle_car [email protected] locked 0 0001: wait 0 ms 0186: $M2 = create_marker_above_car [email protected] 07E0: set_marker $M2 type_to 1 :CARDEL_2040001: wait 0 ms 00D6: if 00DB:   actor $PLAYER_ACTOR in_car [email protected] 004D: jump_if_false @CARDEL_204 0164: disable_marker $M2 00BC: show_text_highpriority GXT 'TM003' time 10000 flag 6 :CARDEL_24800D6: if 8248:   not model #ZR350 available 004D: jump_if_false @CARDEL_275 0001: wait 0 ms 0002: jump @CARDEL_248 :CARDEL_27500A5: [email protected] = create_car #ZR350 at -2754.016 -280.5662 7.0771 0175: set_car [email protected] Z_angle_to 182.9777 0224: set_car [email protected] health_to 1000 020A: set_car [email protected] door_status_to 1 02AC: set_car [email protected] immunities BP 0 FP 0 EP 0 CP 0 MP 0 0519: toggle_car [email protected] locked 0 0001: wait 0 ms 0186: $M3 = create_marker_above_car [email protected] 07E0: set_marker $M3 type_to 1 :CARDEL_3640001: wait 0 ms 00D6: if 00DB:   actor $PLAYER_ACTOR in_car [email protected] 004D: jump_if_false @CARDEL_364 0164: disable_marker $M3 02A8: $M4 = create_marker 0 at -1987.5 253.1396 35.1719 00BC: show_text_highpriority GXT 'TG004' time 10000 flag 6 :CARDEL_4300002: jump @CARDEL 00D6: if and00DB:   actor $PLAYER_ACTOR in_car [email protected] 00FE:   actor $PLAYER_ACTOR sphere 1 in_sphere -1987.5 253.1396 35.1719 radius 2.0 2.0 2.0 004D: jump_if_false @CARDEL_430 0164: disable_marker $M4 00A6: destroy_car [email protected] :CARDEL_50300D6: if 8248:   not model #DFT30 available 004D: jump_if_false @CARDEL_530 0001: wait 0 ms 0002: jump @CARDEL_503 :CARDEL_53000A5: [email protected] = create_car #DFT30 at -1985.831 304.4782 34.8116 0175: set_car [email protected] Z_angle_to 88.8947 0224: set_car [email protected] health_to 1000 020A: set_car [email protected] door_status_to 1 02AC: set_car [email protected] immunities BP 0 FP 0 EP 0 CP 0 MP 0 0519: toggle_car [email protected] locked 0 0002: jump @CARDEL 088C: put_car [email protected] at -1987.831 304.4782 35.1049 // versionB 0939: attach_car [email protected] to_object [email protected] with_offset 0.0 0.0 -0.8 rotation 0.0 0.0 180.0 0186: $M5 = create_marker_above_car [email protected] 07E0: set_marker $M5 type_to 1 :CARDEL_6800001: wait 0 ms 00D6: if and00DB:   actor $PLAYER_ACTOR in_car [email protected] 00FE:   actor $PLAYER_ACTOR sphere 1 in_sphere -1987.5 255.1396 35.1719 radius 2.0 2.0 2.0 004D: jump_if_false @CARDEL_680 0394: play_music 1 01E3: show_text_1number_styled GXT 'M_PASS' number 20000 time 5000 style 1  // MISSION PASSED!~n~~w~$~1~0109: player $PLAYER_CHAR money += 20000 0002: jump @CARDEL_814 00BA: show_text_styled GXT 'M_PASS' time 5000 style 1  // MISSION PASSED!~n~~w~$~1~0051: return :CARDEL_79600BA: show_text_styled GXT 'M_FAIL' time 5000 style 1  // ~r~MISSION FAILED!0051: return :CARDEL_8140004: $ONMISSION = 0 00D8: mission_cleanup 0051: return

 

Edited by gtafan113

Share this post


Link to post
Share on other sites
ZAZ
I had the mission working, and I had the below model with everything besides the parts that mention the DFT. Now, when I play the mission, the markers don't appear and as soon as I get in the first car, it starts a new game. I have no idea how me adding a DFT could have messed it up...

 

 

 

 

:CARDEL_4300002: jump @CARDEL  <--- what is this?

 

 

 

:CARDEL_53000A5: [email protected] = create_car #DFT30 at -1985.831 304.4782 34.81160175: set_car [email protected] Z_angle_to 88.89470224: set_car [email protected] health_to 1000020A: set_car [email protected] door_status_to 102AC: set_car [email protected] immunities BP 0 FP 0 EP 0 CP 0 MP 00519: toggle_car [email protected] locked 00002: jump @CARDEL  <--- what is this?

 

Share this post


Link to post
Share on other sites
gtafan113

Hmm, I do not remember writing those in there so I have no clue, I will try deleting them and seeing if that fixes anything though, thanks for pointing that out. smile.gif

Share this post


Link to post
Share on other sites
gtafan113

So I deleted those two random things, and it doesn't start a new game anymore. However, my markers are still not showing up. Also the car seems to have trouble being moved and attached to the back of the DFT.

 

EDIT: I fixed these two issues. biggrin.gif

Edited by gtafan113

Share this post


Link to post
Share on other sites
gtafan113

There hasn't been a post in a couple days, so I'm allowed to make a new post and not edit right?

 

I was wondering how to add the crane in San Fierro near the Export/Import docks into my mission. Right now, I go there during my mission and there is no red marker for me to get into it. Also, how would I check if my player is in the crane? I tried using this opcode:

 

 

0001: wait 0 ms 00D6: if 0038:   $FLAG_PLAYER_IN_CRANE == 2 004D: jump_if_false @CARDEL_1033

 

 

I didn't get to test it because as I said, the red marker to get into the crane wasn't there.

 

Share this post


Link to post
Share on other sites
ZAZ

 

There hasn't been a post in a couple days, so I'm allowed to make a new post and not edit right?

 

I was wondering how to add the crane in San Fierro near the Export/Import docks into my mission. Right now, I go there during my mission and there is no red marker for me to get into it. Also, how would I check if my player is in the crane? I tried using this opcode:

 

 

0001: wait 0 ms 00D6: if 0038:   $FLAG_PLAYER_IN_CRANE == 2 004D: jump_if_false @CARDEL_1033

 

 

I didn't get to test it because as I said, the red marker to get into the crane wasn't there.

0038: $FLAG_PLAYER_IN_CRANE == 2 is right

red markers (sphere) have a limit of 16

maybe your game should display more because you have cleo scripts which should display some more

Share this post


Link to post
Share on other sites
gtafan113

 

There hasn't been a post in a couple days, so I'm allowed to make a new post and not edit right?

 

I was wondering how to add the crane in San Fierro near the Export/Import docks into my mission. Right now, I go there during my mission and there is no red marker for me to get into it. Also, how would I check if my player is in the crane? I tried using this opcode:

 

 

0001: wait 0 ms 00D6: if 0038:   $FLAG_PLAYER_IN_CRANE == 2 004D: jump_if_false @CARDEL_1033

 

 

I didn't get to test it because as I said, the red marker to get into the crane wasn't there.

0038: $FLAG_PLAYER_IN_CRANE == 2 is right

red markers (sphere) have a limit of 16

maybe your game should display more because you have cleo scripts which should display some more

I was also thinking that maybe it wasn't there because it isn't supposed to be during mission. So during my mission it is disabled and I'm not sure how to turn it on.

 

EDIT: Okay, so I got the red marker to appear that lets me get into the crane, and I can get into it. I can move the magnet up/down and pick up a car. However I cannot move the crane left/right or forward/back. Also, when I release the car, it floats in midair.

Edited by gtafan113

Share this post


Link to post
Share on other sites
gtafan113

I got the crane to work. Now I spawned an open container as in the mission "Customs Fast Track". The problem is, it spawns halfway through the ground and i can't drive my car into it like you can in the mission.

Share this post


Link to post
Share on other sites
NTAuthority

Try this opcode:

 

 

0382: set_object [email protected] collision_detection 1

 

Share this post


Link to post
Share on other sites
gtafan113

Thank you, that worked.

 

Now my mission works! Thank you to all of you! smile.gif

 

Now I just need to make it so that the car model is random. At the moment, its always a ZR-350. I'd like to make it so that the car model is random and that the locations it spawns in are random from ones I've picked.

Share this post


Link to post
Share on other sites
ZAZ

 

Thank you, that worked.

 

Now my mission works! Thank you to all of you! smile.gif

 

Now I just need to make it so that the car model is random. At the moment, its always a ZR-350. I'd like to make it so that the car model is random and that the locations it spawns in are random from ones I've picked.

the last 2 parameter of opcode 0209: are for insert int values

the opcode submit then a random value between these entries to the local var

you can insert the id numbers of the vehicle models 400 - 611 to get a random model

but i think you only want cars

 

0209: [email protected] = random_int  533  5360247: request_model [email protected]:Carspawn0001: wait  0 ms00D6: if  00248:   model [email protected] available004D: jump_if_false @Carspawn04C4: create_coordinate [email protected] [email protected] [email protected] from_actor $PLAYER_ACTOR offset 0.0 5.5  0.300A5: [email protected] = create_car [email protected] at [email protected] [email protected] [email protected]

 

Share this post


Link to post
Share on other sites
gtafan113

I inserted what you said into my code. Every time, the car is a different colored Slamvan and it always spawns right in front of my helicopter. What did I do wrong?

 

 

{$VERSION 3.1.0023}{$CLEO .cm}//-------------MAIN---------------03A4: name_thread "CARDEL" 0050: gosub @CARDEL_46 00D6: if 0112:   wasted_or_busted // mission only 004D: jump_if_false @CARDEL_37 0050: gosub @CARDEL_1512 :CARDEL_370050: gosub @CARDEL_1530 004E: end_thread :CARDEL_460317: increment_mission_attempts 0004: $ONMISSION = 1 00BC: show_text_highpriority GXT 'TM002' time 5000 flag 6 0001: wait 0 ms0209: [email protected] = random_int  533  5360247: request_model [email protected] 0247: load_model #LEVIATHN  0247: load_model #DFT30 038B: load_requested_models :CARDEL_9900D6: if 8248:   not model #LEVIATHN available 004D: jump_if_false @CARDEL_126 0001: wait 0 ms 0002: jump @CARDEL_99 :CARDEL_12600A5: [email protected] = create_car #LEVIATHN at -2099.635 180.8034 36.442 0175: set_car [email protected] Z_angle_to 81.1553 0224: set_car [email protected] health_to 1000 020A: set_car [email protected] door_status_to 1 02AC: set_car [email protected] immunities BP 0 FP 0 EP 0 CP 0 MP 0 0519: toggle_car [email protected] locked 0 0186: $M2 = create_marker_above_car [email protected] 07E0: set_marker $M2 type_to 1 :CARDEL_2110001: wait 0 ms 00D6: if 00DB:   actor $PLAYER_ACTOR in_car [email protected] 004D: jump_if_false @CARDEL_211 0164: disable_marker $M2 00BC: show_text_highpriority GXT 'TM003' time 10000 flag 6 :CARDEL_2550001: wait  0 ms00D6: if  00248:   model [email protected] available004D: jump_if_false @CARDEL_25504C4: create_coordinate [email protected] [email protected] [email protected] from_actor $PLAYER_ACTOR offset 0.0 5.5  0.300A5: [email protected] = create_car [email protected] at [email protected] [email protected] [email protected]  0224: set_car [email protected] health_to 1000 020A: set_car [email protected] door_status_to 1 02AC: set_car [email protected] immunities BP 0 FP 0 EP 0 CP 0 MP 0 0519: toggle_car [email protected] locked 0 0186: $M3 = create_marker_above_car [email protected] 07E0: set_marker $M3 type_to 1 :CARDEL_3740001: wait 0 ms 00D6: if 00DB:   actor $PLAYER_ACTOR in_car [email protected] 004D: jump_if_false @CARDEL_374 0164: disable_marker $M3 0186: $M8 = create_marker_above_car [email protected] 07E0: set_marker $M8 type_to 1 00BC: show_text_highpriority GXT 'TG004' time 10000 flag 6 :CARDEL_4330001: wait 0 ms 00D6: if 0686:   car [email protected] attached 004D: jump_if_false @CARDEL_433 00BC: show_text_highpriority GXT 'TM002' time 10000 flag 6 :CARDEL_4690001: wait 0 ms 00D6: if 00DB:   actor $PLAYER_ACTOR in_car [email protected] 004D: jump_if_false @CARDEL_469 0164: disable_marker $M8 02A8: $M9 = create_marker 0 at -1926.715 256.6426 41.0391 00BC: show_text_highpriority GXT 'TM011' time 10000 flag 6 :CARDEL_5350001: wait 0 ms 00D6: if and00DB:   actor $PLAYER_ACTOR in_car [email protected] 00FE:   actor $PLAYER_ACTOR sphere 1 in_sphere -1926.715 256.6426 41.0391 radius 5.0 5.0 5.0 004D: jump_if_false @CARDEL_535 0164: disable_marker $M9 02A8: $M4 = create_marker 0 at -1987.5 253.1396 35.1719 00BC: show_text_highpriority GXT 'TM012' time 10000 flag 6 :CARDEL_6380001: wait 0 ms 00D6: if and00DB:   actor $PLAYER_ACTOR in_car [email protected] 00FE:   actor $PLAYER_ACTOR sphere 1 in_sphere -1987.5 253.1396 35.1719 radius 2.0 2.0 2.0 004D: jump_if_false @CARDEL_638 0164: disable_marker $M4 00A6: destroy_car [email protected] :CARDEL_70800D6: if 8248:   not model #DFT30 available 004D: jump_if_false @CARDEL_735 0001: wait 0 ms 0002: jump @CARDEL_708 :CARDEL_7350674: set_car_model #DFT30 numberplate "WANGCARS" 00A5: [email protected] = create_car #DFT30 at -1985.831 304.4782 34.8116 0175: set_car [email protected] Z_angle_to 88.8947 0224: set_car [email protected] health_to 1000 020A: set_car [email protected] door_status_to 1 02AC: set_car [email protected] immunities BP 0 FP 0 EP 0 CP 0 MP 0 0519: toggle_car [email protected] locked 0 0001: wait 0 ms 0519: toggle_car [email protected] locked 1 05CD: AS_actor $PLAYER_ACTOR exit_car [email protected] 0508: car [email protected] close_all_doors 020A: set_car [email protected] door_status_to 2 00BC: show_text_highpriority GXT 'TM005' time 10000 flag 6 :CARDEL_8670001: wait 0 ms 00D6: if 80DB:   not actor $PLAYER_ACTOR in_car [email protected] 004D: jump_if_false @CARDEL_867 088C: put_car [email protected] at -1985.097 304.5729 50.4582 // versionB 0683: attach_car [email protected] to_car [email protected] with_offset 0.0 -1.5 0.5 rotation 0.0 0.0 0.0 01C3: remove_references_to_car [email protected] // Like turning a car into any random car 0186: $M5 = create_marker_above_car [email protected] 07E0: set_marker $M5 type_to 1 :CARDEL_9680001: wait 0 ms 00D6: if 00DB:   actor $PLAYER_ACTOR in_car [email protected] 004D: jump_if_false @CARDEL_968 0164: disable_marker $M5 02A8: $M6 = create_marker 0 at -1737.888 28.6927 3.1885 00BC: show_text_highpriority GXT 'TM006' time 10000 flag 6 :CARDEL_10340001: wait 0 ms 00D6: if and00DB:   actor $PLAYER_ACTOR in_car [email protected] 00FE:   actor $PLAYER_ACTOR sphere 1 in_sphere -1737.888 28.6927 3.1885 radius 2.0 2.0 2.0 004D: jump_if_false @CARDEL_1034 0164: disable_marker $M6 02A8: $M7 = create_marker 0 at -1636.82 36.8615 3.1838 029B: [email protected] = init_object -236 at -1646.124 50.1577 4.0 0177: set_object [email protected] Z_angle_to 47.0246 0382: toggle_object [email protected] collision_detection 1 00BC: show_text_highpriority GXT 'TM007' time 10000 flag 6 :CARDEL_11770001: wait 0 ms 00D6: if and00DB:   actor $PLAYER_ACTOR in_car [email protected] 00FE:   actor $PLAYER_ACTOR sphere 1 in_sphere -1636.82 36.8615 3.1838 radius 2.0 2.0 2.0 004D: jump_if_false @CARDEL_1177 0164: disable_marker $M7 00BC: show_text_highpriority GXT 'TM010' time 10000 flag 6 :CARDEL_12580001: wait 0 ms 00D6: if 00FE:   actor $PLAYER_ACTOR sphere 0 in_sphere -1613.661 61.3159 3.5495 radius 1.0 1.0 1.0 004D: jump_if_false @CARDEL_1258 0684: detach_car [email protected] 0.0 0.0 0.0 collision_detection 0 0519: toggle_car [email protected] locked 0 0939: attach_car [email protected] to_object [email protected] with_offset 0.0 0.0 -0.8 rotation 0.0 0.0 180.0 00BC: show_text_highpriority GXT 'TM008' time 10000 flag 6 :CARDEL_13930001: wait 0 ms 00D6: if 81AF:   not car [email protected] sphere 0 in_sphere -1577.794 52.6296 17.3281 radius 4.0 4.0 4.0 004D: jump_if_false @CARDEL_1452 0002: jump @CARDEL_1393 :CARDEL_14520001: wait 0 ms 0394: play_music 1 01E3: show_text_1number_styled GXT 'M_PASS' number 20000 time 5000 style 1  // MISSION PASSED!~n~~w~$~1~0109: player $PLAYER_CHAR money += 20000 0002: jump @CARDEL_1530 00BA: show_text_styled GXT 'M_PASS' time 5000 style 1  // MISSION PASSED!~n~~w~$~1~0051: return :CARDEL_151200BA: show_text_styled GXT 'M_FAIL' time 5000 style 1  // ~r~MISSION FAILED!0051: return :CARDEL_15300004: $ONMISSION = 0 00D8: mission_cleanup 0051: return

 

 

Share this post


Link to post
Share on other sites
ZAZ

 

I inserted what you said into my code. Every time, the car is a different colored Slamvan and it always spawns right in front of my helicopter. What did I do wrong?

 

 

Sometimes the engine choose the the same radom value again

I tried your new script and got a Remington infront of heli by first attempt

the random car spawns allways infront of player

 

Why did you check if car [email protected] is attached, the reading process stucks there

and don't use globals in cleo, it can cause crashes or bugs

in your case you need only one variable for the markers because they will be deleted before a new one will be placed

0186: [email protected] = create_marker_above_car [email protected]

0164: disable_marker [email protected]

0186: [email protected] = create_marker_above_car [email protected]

0164: disable_marker [email protected]

02A8: [email protected] = create_marker 0 at -1926.715 256.6426 41.0391

Edited by ZAZ

Share this post


Link to post
Share on other sites
gtafan113

Yeah, I meant to say, so far all I've got were lowriders. Also, it doesn't ever pause for me when attaching the car. I am using a Chinook mod which turns my leviathan into a Chinook and a Chinook Lock script so I can lock vehicles into the back so that's what that's all about.

 

But about where the car spawns. I want to list different locations and have it spawn the car in one of them randomly.

Share this post


Link to post
Share on other sites
gtafan113

Nevermind, I figured out a way. smile.gif

 

Thank you ZAZ!

 

Also, I want to post this mod so other people can try it when I finish it. Would it be okay that it uses the Chinook and Chinook lock mod? The makers of these mods are no longer active I don't think...

 

Would I also maybe include downloads to them so people can use the mission?

Share this post


Link to post
Share on other sites
ZAZ

 

Nevermind, I figured out a way. smile.gif

 

Thank you ZAZ!

 

Also, I want to post this mod so other people can try it when I finish it. Would it be okay that it uses the Chinook and Chinook lock mod? The makers of these mods are no longer active I don't think...

 

Would I also maybe include downloads to them so people can use the mission?

If I want do your plan I would write the car attachment in the same script and not as cm but just a simple cs.

If possible to ask Dazla and Bob Ghengis Khan for permission, so do it. If not, then add credits in the readme to all people who helped and to Dazla and Bob Ghengis Khan

These authors don't have a monopol for the used opcodes. Just the construct of methods was their brainwork and should be respected.

Is the Chinook lock mod downloadable as cleo? where?

The car attachment should be easy to do and if you write it in your script in your way, it would be your brainwork.

If not, add a link for a download of Chinook lock mod and write "you need Chinook lock mod"

Share this post


Link to post
Share on other sites
gtafan113

All I found of the lock mod was a script. I compiled it as a .cs file though and I could upload it or put into my mission if possible.

 

I will try to contact them. It will still be some time before it is completely finished though.

Share this post


Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Sign in to follow this  

  • 2 Users Currently Viewing
    0 members, 0 Anonymous, 2 Guests

×
×
  • Create New...

Important Information

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