Sagari12 Posted August 23, 2009 Share Posted August 23, 2009 Okay i made a script for a ghostcar. Dont care about the anim I just wanted to check if it all works. {$CLEO .cs}0000: NOP02A8: $marker = create_marker 37 at 472.5948 2577.6165 54.7128 0247: request_model #GLENsh*t0247: request_model 604038B: load_requested_models00A5: $GHOST = create_car #GLENsh*t at 472.5948 2577.6165 54.71280175: set_car $GHOST z_angle_to 144.563600AD: set_car $GHOST max_speed_to 100129: $DUCH = create_actor_pedtype 12 model 1 in_car $GHOST driverseat0ABE: vehicle $GHOST engine_off:petla1wait 10if and00E1: player 0 pressed_key 150206: actor $PLAYER_ACTOR near_car $GHOST radius 5.0 5.0 3.0 flag 0 on_footjf @petla2:petla2wait 004ED: load_animation "PARK":Load_Model_Check0001: wait 0 ms04EE: animation "PARK" loaded004D: jump_if_false @Load_Model_Check0812: AS_actor $PLAYER_ACTOR perform_animation "TAI_CHI_IN" IFP_file "PARK" 1.0 loopA 1 lockX 1 lockY 1 lockF 1 time -204EF: release_animation "PARK"0792: disembark_instantly_actor $PLAYER_ACTOR0A93: end_custom_thread When i turn on GTA SA it works but when i load a save I see a GTASA.exe crash message. Whats wrong? Link to comment Share on other sites More sharing options...
gtasearcher Posted August 23, 2009 Share Posted August 23, 2009 You got a hell lot wrong bud. 1. NEVER USE GLOBALS IN CLEO SCRIPTS UNLESS ABSOLUTELY NECCESARY! 2. duude, you need to check if models are loaded first. 3. This is a wrong sentance :petla1wait 10if and00E1: player 0 pressed_key 150206: actor $PLAYER_ACTOR near_car $GHOST radius 5.0 5.0 3.0 flag 0 on_footjf @petla2:petla2 In either ocassion the code will jump to petla2. 4. 0129: $DUCH = create_actor_pedtype 12 model 1 in_car $GHOST driverseat Model 1?!? You need to set a model, bud, and I think you want model 604. 5. 04EE: animation "PARK" loaded004D: jump_if_false @Load_Model_Check Where exactly is the if? 6. 0812: AS_actor $PLAYER_ACTOR perform_animation "TAI_CHI_IN" IFP_file "PARK" 1.0 loopA 1 lockX 1 lockY 1 lockF 1 time -204EF: release_animation "PARK"0792: disembark_instantly_actor $PLAYER_ACTOR0A93: end_custom_thread Everything will happen at the same time, player won't be able to perform the anim even for a minisecond. ____________ Fixed up code thread 'GCAR'02A8: [email protected] = create_marker 37 at 472.5948 2577.6165 54.7128:GCAR1wait 0ifnot [email protected] == -1thenCar.RemoveReferences([email protected])endifnot [email protected] == -1thenActor.RemoveReferences([email protected])ifPlayer.Defined($PLAYER_CHAR)jf @GCAR1ifPlayer.Controllable($PLAYER_CHAR)jf @GCAR1if$ONMISSION == 0jf @GCAR1if00FE: $PLAYER_ACTOR 0 472.5948 2577.6165 54.7128 100.0 100.0 100.0JF @GCAR10247: request_model #GLENsh*t0247: request_model 604038B: load_requested_modelswhile truewait 0if and#GLENsh*t.Available()Model.Available(604)then breakendend00A5: [email protected]= create_car #GLENsh*t at 472.5948 2577.6165 54.71280175: set_car [email protected] z_angle_to 144.563600AD: set_car [email protected] max_speed_to 10.00129: [email protected] = create_actor_pedtype 12 model 604 in_car [email protected] driverseat#GLENsh*t.destroy()Model.Destroy(604)0ABE: vehicle [email protected] engine_offwhile truewait 0ifPlayer.Defined($PLAYER_CHAR)jf @GCAR1ifPlayer.Controllable($PLAYER_CHAR)jf @GCAR1if$ONMISSION == 0jf @GCAR1if00FE: $PLAYER_ACTOR 0 472.5948 2577.6165 54.7128 125.0 125.0 125.0JF @GCAR1if andnot Actor.Dead([email protected])not Car.Wrecked([email protected])jf @GCAR1if and00E1: player 0 pressed_key 150206: actor $PLAYER_ACTOR near_car [email protected] radius 5.0 5.0 3.0 flag 0 on_footthen breakendend04ED: load_animation "PARK":Load_Model_Check0001: wait 0 msif04EE: animation "PARK" loaded004D: jump_if_false @Load_Model_Check0605: $PLAYER_ACTOR "TAI_CHI_IN" "PARK" 4.0 0 0 0 0 -104EF: release_animation "PARK"0A93: Link to comment Share on other sites More sharing options...
Sagari12 Posted August 23, 2009 Author Share Posted August 23, 2009 (edited) Thanx man. I have a compile error. Not enough parameters. Edited August 23, 2009 by Sagari12 Link to comment Share on other sites More sharing options...
TheSiggi Posted August 23, 2009 Share Posted August 23, 2009 end_custom_thread is missing at the end..... thread 'GCAR'02A8: [email protected] = create_marker 37 at 472.5948 2577.6165 54.7128:GCAR1wait 0ifnot [email protected] == -1thenCar.RemoveReferences([email protected])endifnot [email protected] == -1thenActor.RemoveReferences([email protected])ifPlayer.Defined($PLAYER_CHAR)jf @GCAR1ifPlayer.Controllable($PLAYER_CHAR)jf @GCAR1if$ONMISSION == 0jf @GCAR1if00FE: $PLAYER_ACTOR 0 472.5948 2577.6165 54.7128 100.0 100.0 100.0JF @GCAR10247: request_model #GLENsh*t0247: request_model 604038B: load_requested_modelswhile truewait 0if and#GLENsh*t.Available()Model.Available(604)then breakendend00A5: [email protected]= create_car #GLENsh*t at 472.5948 2577.6165 54.71280175: set_car [email protected] z_angle_to 144.563600AD: set_car [email protected] max_speed_to 10.00129: [email protected] = create_actor_pedtype 12 model 604 in_car [email protected] driverseat#GLENsh*t.destroy()Model.Destroy(604)0ABE: vehicle [email protected] engine_offwhile truewait 0ifPlayer.Defined($PLAYER_CHAR)jf @GCAR1ifPlayer.Controllable($PLAYER_CHAR)jf @GCAR1if$ONMISSION == 0jf @GCAR1if00FE: $PLAYER_ACTOR 0 472.5948 2577.6165 54.7128 125.0 125.0 125.0JF @GCAR1if andnot Actor.Dead([email protected])not Car.Wrecked([email protected])jf @GCAR1if and00E1: player 0 pressed_key 150206: actor $PLAYER_ACTOR near_car [email protected] radius 5.0 5.0 3.0 flag 0 on_footthen breakendend04ED: load_animation "PARK":Load_Model_Check0001: wait 0 msif04EE: animation "PARK" loaded004D: jump_if_false @Load_Model_Check0605: $PLAYER_ACTOR "TAI_CHI_IN" "PARK" 4.0 0 0 0 0 -104EF: release_animation "PARK"0A93: end_custom_thread Link to comment Share on other sites More sharing options...
Deji Posted August 23, 2009 Share Posted August 23, 2009 Is #GLENsh*t even a valid model name? I mean, won't the game crash if you add a * into the model name? I reckon it'd be best to get a new name with letters only and then try again. No wonder it crashes during load... Link to comment Share on other sites More sharing options...
TheSiggi Posted August 23, 2009 Share Posted August 23, 2009 What? did he wrote that or does gtaforums.com censore GLENsh*t? XD you live and learn XD whats about.... c*ntgun XD thats toooo much Link to comment Share on other sites More sharing options...
Sagari12 Posted August 23, 2009 Author Share Posted August 23, 2009 I added end custom thread and opcode. BUT IT STILL DIDNT COMPILE. Not enough actual parameters. Expected 5 params. Yes i changed GLENsh*t to normal GLENS H I T. Of course without free spaces. Link to comment Share on other sites More sharing options...
james227uk Posted August 23, 2009 Share Posted August 23, 2009 It's a different opcode that's the problem, not end_custom_thread End custom thread has NO parameters. Link to comment Share on other sites More sharing options...
Sagari12 Posted August 23, 2009 Author Share Posted August 23, 2009 (edited) Can you check the code and see what is wrong? After it can you submit a modified one but change the animation to stomach shoot anim? And maybe add an hour when the car will be spawned: from 22.00-2.00 The same with radar icon. When CJ falls down make the screen black and get back to game at 8.00am. CJ stands up but the car is not there. Edited August 23, 2009 by Sagari12 Link to comment Share on other sites More sharing options...
TheSiggi Posted August 23, 2009 Share Posted August 23, 2009 (edited) fixxed it now but Sannybuilder still can't compile because some highconstructs doesn't end with an 'end' thread 'GCAR'02A8: [email protected] = create_marker 37 at 472.5948 2577.6165 54.7128:GCAR1wait 0ifnot [email protected] == -1thenCar.RemoveReferences([email protected])endifnot [email protected] == -1thenActor.RemoveReferences([email protected])ifPlayer.Defined($PLAYER_CHAR)jf @GCAR1ifPlayer.Controllable($PLAYER_CHAR)jf @GCAR1if$ONMISSION == 0jf @GCAR1if00FE: $PLAYER_ACTOR 0 472.5948 2577.6165 54.7128 100.0 100.0 100.0JF @GCAR10247: request_model #GLENsh*t0247: request_model 604038B: load_requested_modelswhile truewait 0if and#GLENsh*t.Available()Model.Available(604)then breakendend00A5: [email protected] = create_car #GLENsh*t at 472.5948 2577.6165 54.71280175: set_car [email protected] z_angle_to 144.563600AD: set_car [email protected] max_speed_to 10.00129: [email protected] = create_actor_pedtype 12 model 604 in_car [email protected] driverseat#GLENsh*t.destroy()Model.Destroy(604)0ABE: vehicle [email protected] engine_offwhile truewait 0ifPlayer.Defined($PLAYER_CHAR)jf @GCAR1ifPlayer.Controllable($PLAYER_CHAR)jf @GCAR1if$ONMISSION == 0jf @GCAR1if00FE: $PLAYER_ACTOR 0 472.5948 2577.6165 54.7128 125.0 125.0 125.0JF @GCAR1if andnot Actor.Dead([email protected])not Car.Wrecked([email protected])jf @GCAR1if and00E1: player 0 pressed_key 150206: actor $PLAYER_ACTOR near_car [email protected] radius 5.0 5.0 3.0 flag 0 on_footthen breakendend04ED: load_animation "PARK":Load_Model_Check0001: wait 0 msif04EE: animation "PARK" loaded004D: jump_if_false @Load_Model_Check0605: $PLAYER_ACTOR "TAI_CHI_IN" "PARK" 4.0 0 0 0 0 -104EF: release_animation "PARK"0A93: end_custom_thread Edited August 23, 2009 by The_Siggi Link to comment Share on other sites More sharing options...
Sagari12 Posted August 23, 2009 Author Share Posted August 23, 2009 Can some1 fix this? Link to comment Share on other sites More sharing options...
TheSiggi Posted August 23, 2009 Share Posted August 23, 2009 (edited) I can re-write it as I would have done it but I'm not quite sure whats the content of the script what that stands for :GCAR1wait 0ifnot [email protected] == -1thenCar.RemoveReferences([email protected])endifnot [email protected] == -1thenActor.RemoveReferences([email protected]) Edited August 23, 2009 by The_Siggi Link to comment Share on other sites More sharing options...
Sagari12 Posted August 23, 2009 Author Share Posted August 23, 2009 (edited) but I'm not quite sure whats the content of the script You mean what is it for? For fun. I want a GLENDALE GHOST or GLENDALE S H I T as they call it stand on these coords:472.5948 2577.6165 54.7128 angle:144.5636 The car will spawn at 22.00 and stay there to 4.00 When you try to steal it it plays a stomach shoot anim and when CJ is down shows a black screen. At 8.00 you wake up and the car is gone. Cj also says WHAT THE HELL WAS THAT. And add a marker: this one: ? Edited August 23, 2009 by Sagari12 Link to comment Share on other sites More sharing options...
Dutchy3010 Posted August 23, 2009 Share Posted August 23, 2009 I'll explain how "The_Siggi" fixed the SannyBuilder errors. You had to use: 02D4: car [email protected] turn_off_engine Instead of: 0ABE: vehicle [email protected] engine_off Besides that, you had no space between the [email protected] and the =: 00A5: [email protected]= create_car #GLENsh*t at 472.5948 2577.6165 54.7128 Then about the High Level Constructions.. It is handy to use spaces in loops, that makes it more organized. As an example, I did it for you. You will know exactly where you missed the end. thread 'GCAR'02A8: [email protected] = create_marker 37 at 472.5948 2577.6165 54.7128:GCAR1wait 0if not [email protected] == -1then Car.RemoveReferences([email protected])endif // You didn't have an end for this if not [email protected] == -1then Actor.RemoveReferences([email protected]) if Player.Defined($PLAYER_CHAR) jf @GCAR1 if Player.Controllable($PLAYER_CHAR) jf @GCAR1 if $ONMISSION == 0 jf @GCAR1 if 00FE: $PLAYER_ACTOR 0 472.5948 2577.6165 54.7128 100.0 100.0 100.0 jf @GCAR1 0247: request_model #GLENsh*t 0247: request_model 604 038B: load_requested_models while true wait 0 if and #GLENsh*t.Available() Model.Available(604) then break end end 00A5: [email protected] = create_car #GLENsh*t at 472.5948 2577.6165 54.7128 0175: set_car [email protected] z_angle_to 144.5636 00AD: set_car [email protected] max_speed_to 10.0 0129: [email protected] = create_actor_pedtype 12 model 604 in_car [email protected] driverseat #GLENsh*t.destroy() Model.Destroy(604) 02D4: car [email protected] turn_off_engine while true wait 0 if Player.Defined($PLAYER_CHAR) jf @GCAR1 if Player.Controllable($PLAYER_CHAR) jf @GCAR1 if $ONMISSION == 0 jf @GCAR1 if 00FE: $PLAYER_ACTOR 0 472.5948 2577.6165 54.7128 125.0 125.0 125.0 jf @GCAR1 if and not Actor.Dead([email protected]) not Car.Wrecked([email protected]) jf @GCAR1 if and 00E1: player 0 pressed_key 15 0206: actor $PLAYER_ACTOR near_car [email protected] radius 5.0 5.0 3.0 flag 0 on_foot then break end endend // you forgot this one, this is an end which belong to the other //04ED: load_animation "PARK":Load_Model_Checkwait 0if 04EE: animation "PARK" loadedjf @Load_Model_Check0605: $PLAYER_ACTOR "TAI_CHI_IN" "PARK" 4.0 0 0 0 0 -104EF: release_animation "PARK"0A93: end_custom_thread DYOM - Create, play, share! Link to comment Share on other sites More sharing options...
ZAZ Posted August 23, 2009 Share Posted August 23, 2009 What happens here? Am I crazy? Did anybody tested this script ingame? [email protected] is a marker and not a car the car is created as [email protected] and then the actor is created as [email protected] in car [email protected] CLEO MODS CLEO Script Tutorial Link to comment Share on other sites More sharing options...
Sagari12 Posted August 23, 2009 Author Share Posted August 23, 2009 Cool it compiled but..... When i reach the marker gtasa.exe crashes. For fun. I want a GLENDALE GHOST or GLENDALE S H I T as they call it stand on these coords:472.5948 2577.6165 54.7128angle:144.5636 The car will spawn at 22.00 and stay there to 4.00 When you try to steal it it plays a stomach shoot anim and when CJ is down shows a black screen. At 8.00 you wake up and the car is gone. Cj also says WHAT THE HELL WAS THAT. And add a marker: this one: ? When some1 make it work please change it a little. Link to comment Share on other sites More sharing options...
Dutchy3010 Posted August 24, 2009 Share Posted August 24, 2009 What happens here? Am I crazy? Did anybody tested this script ingame? No. I only looked at the errors... @ Sagari12: look at what ZAZ said... 00A5: [email protected] = create_car #GLENsh*t at 472.5948 2577.6165 54.71280175: set_car [email protected] z_angle_to 144.563600AD: set_car [email protected] max_speed_to 10.00129: [email protected] = create_actor_pedtype 12 model 604 in_car [email protected] driverseat You create a car with handle [email protected], then you use in_car [email protected] You also check this: not Car.Wrecked([email protected]) Just change the [email protected] from the cars in [email protected] There can be other errors, but I'm at the moment too lazy to look. Change this and test it again. DYOM - Create, play, share! Link to comment Share on other sites More sharing options...
Sagari12 Posted August 24, 2009 Author Share Posted August 24, 2009 {$VERSION 3.1.0027}{$CLEO .cs}//-------------MAIN---------------0000: NOP 03A4: name_thread 'GCAR' 02A8: [email protected] = create_marker 37 at 472.5948 2577.616 54.7128 :GCAR_350001: wait 0 ms 00D6: if 8039: not [email protected] == -1 004D: jump_if_false @GCAR_62 01C3: remove_references_to_car [email protected] // Like turning a car into any random car :GCAR_6200D6: if 8039: not [email protected] == -1 004D: jump_if_false @GCAR_484 01C2: remove_references_to_actor [email protected] // Like turning an actor into a random pedestrian 00D6: if 0256: player $PLAYER_CHAR defined 004D: jump_if_false @GCAR_35 00D6: if 03EE: player $PLAYER_CHAR controllable 004D: jump_if_false @GCAR_35 00D6: if 0038: $ONMISSION == 0 004D: jump_if_false @GCAR_35 00D6: if 00FE: actor $PLAYER_ACTOR sphere 0 in_sphere 472.5948 2577.616 54.7128 radius 100.0 100.0 100.0 004D: jump_if_false @GCAR_35 0247: load_model #GLENsh*t 0247: load_model #GLENsh*t 038B: load_requested_models :GCAR_1950001: wait 0 ms 00D6: if and0248: model #GLENsh*t available 0248: model #GLENsh*t available 004D: jump_if_false @GCAR_227 0002: jump @GCAR_234 :GCAR_2270002: jump @GCAR_195 :GCAR_23400A5: [email protected] = create_car #GLENsh*t at 472.5948 2577.616 54.7128 0175: set_car [email protected] Z_angle_to 144.5636 00AD: set_car [email protected] max_speed_to 10.0 0129: [email protected] = create_actor_pedtype 12 model #GLENsh*t in_car [email protected] driverseat 0249: release_model #GLENsh*t 0249: release_model #GLENsh*t 02D4: car [email protected] turn_off_engine :GCAR_3050001: wait 0 ms 00D6: if 0256: player $PLAYER_CHAR defined 004D: jump_if_false @GCAR_35 00D6: if 03EE: player $PLAYER_CHAR controllable 004D: jump_if_false @GCAR_35 00D6: if 0038: $ONMISSION == 0 004D: jump_if_false @GCAR_35 00D6: if 00FE: actor $PLAYER_ACTOR sphere 0 in_sphere 472.5948 2577.616 54.7128 radius 125.0 125.0 125.0 004D: jump_if_false @GCAR_35 00D6: if and8118: not actor [email protected] dead 8119: not car [email protected] wrecked 004D: jump_if_false @GCAR_35 00D6: if and00E1: player 0 pressed_key 15 0206: actor $PLAYER_ACTOR near_car [email protected] radius 5.0 5.0 3.0 flag 0 on_foot 004D: jump_if_false @GCAR_477 0002: jump @GCAR_484 :GCAR_4770002: jump @GCAR_305 :GCAR_48404ED: load_animation "PARK" :GCAR_4920001: wait 0 ms 00D6: if 04EE: animation "PARK" loaded 004D: jump_if_false @GCAR_492 0605: actor $PLAYER_ACTOR perform_animation_sequence "TAI_CHI_IN" IFP_file "PARK" 4.0 loop 0 0 0 0 time -1 // versionA 04EF: release_animation "PARK" 0A93: end_custom_thread I remade i BUT.... The marker is there but the car isint. Link to comment Share on other sites More sharing options...
ceedj Posted August 24, 2009 Share Posted August 24, 2009 Color me confused about all of this: 004D: jump_if_false @GCAR_350247: load_model #GLENsh*t0247: load_model #GLENsh*t038B: load_requested_models:GCAR_1950001: wait 0 ms00D6: if and0248: model #GLENsh*t available0248: model #GLENsh*t available004D: jump_if_false @GCAR_2270002: jump @GCAR_234:GCAR_2270002: jump @GCAR_195:GCAR_23400A5: [email protected] = create_car #GLENsh*t at 472.5948 2577.616 54.71280175: set_car [email protected] Z_angle_to 144.563600AD: set_car [email protected] max_speed_to 10.00129: [email protected] = create_actor_pedtype 12 model #GLENsh*t in_car [email protected] driverseat0249: release_model #GLENsh*t0249: release_model #GLENsh*t02D4: car [email protected] turn_off_engine Any particular reason you're using the same model for the car AND actor? I'm actually not against democracy though. I'm against things I think are f*cking stupid. I think this is f*cking stupid. - Sweets Link to comment Share on other sites More sharing options...
Sagari12 Posted August 24, 2009 Author Share Posted August 24, 2009 Im out. Can someone make this script work like i said few posts earlier. I want a GLENDALE GHOST or GLENDALE S H I T as they call it stand on these coords:472.5948 2577.6165 54.7128angle:144.5636 The car will spawn at 22.00 and stay there to 4.00 When you try to steal it it plays a stomach shoot anim and when CJ is down shows a black screen. At 8.00 you wake up and the car is gone. Cj also says WHAT THE HELL WAS THAT. And add a marker: this one: ? Link to comment Share on other sites More sharing options...
ceedj Posted August 24, 2009 Share Posted August 24, 2009 Not that hard. There is an opcode to get the current time, use that in a loop and check if it matches that time, example: get current time hours and minutes (2 variables here) if time = your value jump to create car, else do whatever until time reaches that point. To do the stomach shot thing I might check if it's a player car (is car 0 a player car) and if not, do the animation and fades, set the time while the fade is out, then re-fade back in. Since messing with the time will affect Carl's hunger (a weird byproduct), I'd also get the hunger stat CORRECTION - fat and muscle stat - and set it to that when doing the fade back in. This is all off the top of my head, but I'm sure about 95% of this can be found in the original game code. I'm actually not against democracy though. I'm against things I think are f*cking stupid. I think this is f*cking stupid. - Sweets Link to comment Share on other sites More sharing options...
Sagari12 Posted August 25, 2009 Author Share Posted August 25, 2009 Can you make this script for me??? PLEASE. Link to comment Share on other sites More sharing options...
TheSiggi Posted August 25, 2009 Share Posted August 25, 2009 (edited) Which actor should drive the car? and about the marker: is there a marker or is it above a(n) car/actor Edited August 25, 2009 by The_Siggi Link to comment Share on other sites More sharing options...
Sagari12 Posted August 25, 2009 Author Share Posted August 25, 2009 This russian mafia guy. Marker on the map not on the car or guy. Link to comment Share on other sites More sharing options...
TheSiggi Posted August 25, 2009 Share Posted August 25, 2009 there are many mafia guys the four you found on the streets in Las Venturas and three other guys which look very serious + the guys used in the missions: Sindaco sen. and jun. I will make it with #MALE01 so you can change thge driver easily Link to comment Share on other sites More sharing options...
Sagari12 Posted August 25, 2009 Author Share Posted August 25, 2009 (edited) I mean RUSSIAN mafia guy this one in black jacket. Edited August 25, 2009 by Sagari12 Link to comment Share on other sites More sharing options...
TheSiggi Posted August 25, 2009 Share Posted August 25, 2009 oh....you mean André....the arms dealer from the mission 'Gray Imports' Link to comment Share on other sites More sharing options...
Sagari12 Posted August 25, 2009 Author Share Posted August 25, 2009 Yes. Link to comment Share on other sites More sharing options...
Sagari12 Posted August 26, 2009 Author Share Posted August 26, 2009 How are you going? Scripting? Or already finished? Link to comment Share on other sites More sharing options...
Deji Posted August 27, 2009 Share Posted August 27, 2009 Andre is dressed in blue. He is not russian. I think the one you are talking about is the one in all black, right? Link to comment 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