gtafan113 Posted February 28, 2010 Share Posted February 28, 2010 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 Link to comment https://gtaforums.com/topic/442021-help-with-script/ Share on other sites More sharing options...
Kriskers Posted March 1, 2010 Share Posted March 1, 2010 Troubleshooting questions go under SA troubleshooting, geez.. isnt the message coming to you, guys??? Link to comment https://gtaforums.com/topic/442021-help-with-script/#findComment-1059803478 Share on other sites More sharing options...
TheSiggi Posted March 1, 2010 Share Posted March 1, 2010 (edited) 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 March 1, 2010 by The_Siggi Link to comment https://gtaforums.com/topic/442021-help-with-script/#findComment-1059803495 Share on other sites More sharing options...
Kriskers Posted March 1, 2010 Share Posted March 1, 2010 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! Link to comment https://gtaforums.com/topic/442021-help-with-script/#findComment-1059803509 Share on other sites More sharing options...
TheSiggi Posted March 1, 2010 Share Posted March 1, 2010 guess why jerk! because theres a mistake in his script! thats unbeliveable @ 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 Link to comment https://gtaforums.com/topic/442021-help-with-script/#findComment-1059803552 Share on other sites More sharing options...
james227uk Posted March 1, 2010 Share Posted March 1, 2010 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. Link to comment https://gtaforums.com/topic/442021-help-with-script/#findComment-1059803757 Share on other sites More sharing options...
ZAZ Posted March 1, 2010 Share Posted March 1, 2010 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: 1@ = create_car #LEVIATHN at -1925.675 242.1439 41.03910175: set_car 1@ Z_angle_to 270.00224: set_car 1@ health_to 10000186: 2@ = create_marker_above_car 1@0165: set_marker 2@ color_to 2:CARDELIVERY_m30001: wait 0 msif and8119: not car 1@ wrecked0202: actor $PLAYER_ACTOR near_car 1@ radius 90.0 90.0 unknown 0004D: jump_if_false @CARDELIVERY_fail_1 if00DB: actor $PLAYER_ACTOR in_car 1@ 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 2@01C3: remove_references_to_car 1@0004: $ONMISSION = 000D8: mission_cleanup0051: return Link to comment https://gtaforums.com/topic/442021-help-with-script/#findComment-1059803796 Share on other sites More sharing options...
gtafan113 Posted March 1, 2010 Author Share Posted March 1, 2010 Thank you all of you, I will try what you guys said. Link to comment https://gtaforums.com/topic/442021-help-with-script/#findComment-1059803925 Share on other sites More sharing options...
gtafan113 Posted March 2, 2010 Author Share Posted March 2, 2010 (edited) 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: 0@ = create_car #LEVIATHN at -2026.62 138.0813 28.8359 0175: set_car 0@ Z_angle_to 181.0849 0224: set_car 0@ health_to 1000 020A: set_car 0@ door_status_to 1 02AC: set_car 0@ immunities BP 0 FP 0 EP 0 CP 0 MP 0 0519: toggle_car 0@ locked 0 0001: wait 0 ms 0186: $M2 = create_marker_above_car 0@ 07E0: set_marker $M2 type_to 1 :CARDEL_2040001: wait 0 ms 00D6: if 00DB: actor $PLAYER_ACTOR in_car 0@ 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: 1@ = create_car #ZR350 at -2754.016 -280.5662 7.0771 0175: set_car 1@ Z_angle_to 182.9777 0224: set_car 1@ health_to 1000 020A: set_car 1@ door_status_to 1 02AC: set_car 1@ immunities BP 0 FP 0 EP 0 CP 0 MP 0 0519: toggle_car 1@ locked 0 0001: wait 0 ms 0186: $M3 = create_marker_above_car 1@ 07E0: set_marker $M3 type_to 1 :CARDEL_3640001: wait 0 ms 00D6: if 00DB: actor $PLAYER_ACTOR in_car 1@ 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 1@ 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 0@ :CARDEL_50300D6: if 8248: not model #DFT30 available 004D: jump_if_false @CARDEL_530 0001: wait 0 ms 0002: jump @CARDEL_503 :CARDEL_53000A5: 2@ = create_car #DFT30 at -1985.831 304.4782 34.8116 0175: set_car 2@ Z_angle_to 88.8947 0224: set_car 2@ health_to 1000 020A: set_car 2@ door_status_to 1 02AC: set_car 2@ immunities BP 0 FP 0 EP 0 CP 0 MP 0 0519: toggle_car 2@ locked 0 0002: jump @CARDEL 088C: put_car 1@ at -1987.831 304.4782 35.1049 // versionB 0939: attach_car 1@ to_object 2@ with_offset 0.0 0.0 -0.8 rotation 0.0 0.0 180.0 0186: $M5 = create_marker_above_car 2@ 07E0: set_marker $M5 type_to 1 :CARDEL_6800001: wait 0 ms 00D6: if and00DB: actor $PLAYER_ACTOR in_car 2@ 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 March 2, 2010 by gtafan113 Link to comment https://gtaforums.com/topic/442021-help-with-script/#findComment-1059805587 Share on other sites More sharing options...
ZAZ Posted March 2, 2010 Share Posted March 2, 2010 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: 2@ = create_car #DFT30 at -1985.831 304.4782 34.81160175: set_car 2@ Z_angle_to 88.89470224: set_car 2@ health_to 1000020A: set_car 2@ door_status_to 102AC: set_car 2@ immunities BP 0 FP 0 EP 0 CP 0 MP 00519: toggle_car 2@ locked 00002: jump @CARDEL <--- what is this? Link to comment https://gtaforums.com/topic/442021-help-with-script/#findComment-1059805659 Share on other sites More sharing options...
gtafan113 Posted March 3, 2010 Author Share Posted March 3, 2010 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. Link to comment https://gtaforums.com/topic/442021-help-with-script/#findComment-1059805936 Share on other sites More sharing options...
gtafan113 Posted March 3, 2010 Author Share Posted March 3, 2010 (edited) 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. Edited March 3, 2010 by gtafan113 Link to comment https://gtaforums.com/topic/442021-help-with-script/#findComment-1059805951 Share on other sites More sharing options...
gtafan113 Posted March 4, 2010 Author Share Posted March 4, 2010 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. Link to comment https://gtaforums.com/topic/442021-help-with-script/#findComment-1059807590 Share on other sites More sharing options...
ZAZ Posted March 4, 2010 Share Posted March 4, 2010 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 Link to comment https://gtaforums.com/topic/442021-help-with-script/#findComment-1059808635 Share on other sites More sharing options...
gtafan113 Posted March 5, 2010 Author Share Posted March 5, 2010 (edited) 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 March 5, 2010 by gtafan113 Link to comment https://gtaforums.com/topic/442021-help-with-script/#findComment-1059808920 Share on other sites More sharing options...
gtafan113 Posted March 6, 2010 Author Share Posted March 6, 2010 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. Link to comment https://gtaforums.com/topic/442021-help-with-script/#findComment-1059810431 Share on other sites More sharing options...
NTAuthority Posted March 6, 2010 Share Posted March 6, 2010 Try this opcode: 0382: set_object 0@ collision_detection 1 Link to comment https://gtaforums.com/topic/442021-help-with-script/#findComment-1059810612 Share on other sites More sharing options...
gtafan113 Posted March 6, 2010 Author Share Posted March 6, 2010 Thank you, that worked. Now my mission works! Thank you to all of you! 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. Link to comment https://gtaforums.com/topic/442021-help-with-script/#findComment-1059811208 Share on other sites More sharing options...
ZAZ Posted March 6, 2010 Share Posted March 6, 2010 Thank you, that worked. Now my mission works! Thank you to all of you! 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: 5@ = random_int 533 5360247: request_model 5@:Carspawn0001: wait 0 ms00D6: if 00248: model 5@ available004D: jump_if_false @Carspawn04C4: create_coordinate 11@ 12@ 13@ from_actor $PLAYER_ACTOR offset 0.0 5.5 0.300A5: 1@ = create_car 5@ at 11@ 12@ 13@ Link to comment https://gtaforums.com/topic/442021-help-with-script/#findComment-1059811329 Share on other sites More sharing options...
gtafan113 Posted March 6, 2010 Author Share Posted March 6, 2010 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: 5@ = random_int 533 5360247: request_model 5@ 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: 3@ = create_car #LEVIATHN at -2099.635 180.8034 36.442 0175: set_car 3@ Z_angle_to 81.1553 0224: set_car 3@ health_to 1000 020A: set_car 3@ door_status_to 1 02AC: set_car 3@ immunities BP 0 FP 0 EP 0 CP 0 MP 0 0519: toggle_car 3@ locked 0 0186: $M2 = create_marker_above_car 3@ 07E0: set_marker $M2 type_to 1 :CARDEL_2110001: wait 0 ms 00D6: if 00DB: actor $PLAYER_ACTOR in_car 3@ 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 5@ available004D: jump_if_false @CARDEL_25504C4: create_coordinate 11@ 12@ 13@ from_actor $PLAYER_ACTOR offset 0.0 5.5 0.300A5: 1@ = create_car 5@ at 11@ 12@ 13@ 0224: set_car 1@ health_to 1000 020A: set_car 1@ door_status_to 1 02AC: set_car 1@ immunities BP 0 FP 0 EP 0 CP 0 MP 0 0519: toggle_car 1@ locked 0 0186: $M3 = create_marker_above_car 1@ 07E0: set_marker $M3 type_to 1 :CARDEL_3740001: wait 0 ms 00D6: if 00DB: actor $PLAYER_ACTOR in_car 1@ 004D: jump_if_false @CARDEL_374 0164: disable_marker $M3 0186: $M8 = create_marker_above_car 3@ 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 1@ 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 3@ 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 3@ 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 1@ 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 3@ :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: 2@ = create_car #DFT30 at -1985.831 304.4782 34.8116 0175: set_car 2@ Z_angle_to 88.8947 0224: set_car 2@ health_to 1000 020A: set_car 2@ door_status_to 1 02AC: set_car 2@ immunities BP 0 FP 0 EP 0 CP 0 MP 0 0519: toggle_car 2@ locked 0 0001: wait 0 ms 0519: toggle_car 1@ locked 1 05CD: AS_actor $PLAYER_ACTOR exit_car 1@ 0508: car 1@ close_all_doors 020A: set_car 1@ 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 1@ 004D: jump_if_false @CARDEL_867 088C: put_car 1@ at -1985.097 304.5729 50.4582 // versionB 0683: attach_car 1@ to_car 2@ with_offset 0.0 -1.5 0.5 rotation 0.0 0.0 0.0 01C3: remove_references_to_car 1@ // Like turning a car into any random car 0186: $M5 = create_marker_above_car 2@ 07E0: set_marker $M5 type_to 1 :CARDEL_9680001: wait 0 ms 00D6: if 00DB: actor $PLAYER_ACTOR in_car 2@ 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 2@ 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: 4@ = init_object -236 at -1646.124 50.1577 4.0 0177: set_object 4@ Z_angle_to 47.0246 0382: toggle_object 4@ 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 2@ 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 1@ 0.0 0.0 0.0 collision_detection 0 0519: toggle_car 1@ locked 0 0939: attach_car 1@ to_object 4@ 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 1@ 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 Link to comment https://gtaforums.com/topic/442021-help-with-script/#findComment-1059811380 Share on other sites More sharing options...
ZAZ Posted March 6, 2010 Share Posted March 6, 2010 (edited) 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 1@ 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: 30@ = create_marker_above_car 1@ 0164: disable_marker 30@ 0186: 30@ = create_marker_above_car 3@ 0164: disable_marker 30@ 02A8: 30@ = create_marker 0 at -1926.715 256.6426 41.0391 Edited March 6, 2010 by ZAZ Link to comment https://gtaforums.com/topic/442021-help-with-script/#findComment-1059811675 Share on other sites More sharing options...
gtafan113 Posted March 6, 2010 Author Share Posted March 6, 2010 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. Link to comment https://gtaforums.com/topic/442021-help-with-script/#findComment-1059811690 Share on other sites More sharing options...
gtafan113 Posted March 7, 2010 Author Share Posted March 7, 2010 Nevermind, I figured out a way. 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? Link to comment https://gtaforums.com/topic/442021-help-with-script/#findComment-1059811935 Share on other sites More sharing options...
ZAZ Posted March 7, 2010 Share Posted March 7, 2010 Nevermind, I figured out a way. 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" Link to comment https://gtaforums.com/topic/442021-help-with-script/#findComment-1059812160 Share on other sites More sharing options...
gtafan113 Posted March 7, 2010 Author Share Posted March 7, 2010 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. Link to comment https://gtaforums.com/topic/442021-help-with-script/#findComment-1059812169 Share on other sites More sharing options...
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now