SomeGuy86 Posted January 17, 2012 Share Posted January 17, 2012 (edited) Guys, I have a question... I'd need to create a CLEO spawn menu, like the ones you can see around GTA modding websites, that would be activated by certain cheat... Yet, I'd prefer to keep the script simple, as simple as possible! For example, typing "EXTRA" would display the window with let's say 10-15 vehicles, and you could choose between all of them, which one to spawn. Can you give me few tips, tell me where to start? I used to have some basic GTA scripting knowledge, but got rusty over the years, it's been a long time EDIT OK, so I've been messing around with CLEO scripts, and I found very old one, made by ZAZ. I believe it's his first edition of car spawner, and the script is mostly simple, so I've been meaning to modify the ID scale, in order to meet my requirements, but unfortunately it crashes San Andreas every time I press the button. (modified or not...) // This file was decompiled using sascm.ini published by Seemann (http://sannybuilder.com/files/SASCM.rar) on 13.10.2007{$VERSION 3.1.0027}{$CLEO .cs}//-------------MAIN---------------thread 'VEHICLE' [email protected] = 1 [email protected] = 1 [email protected] = 4 [email protected] = 1 [email protected] = 1 [email protected] = 50.0 [email protected] = 411 jump @VEHICLE_71 :VEHICLE_71wait 0 if Player.Defined($PLAYER_CHAR)jf @VEHICLE_71 if and Player.Controllable($PLAYER_CHAR) not Actor.Driving($PLAYER_ACTOR)jf @VEHICLE_71 if 0AB0: key_pressed 50 jf @VEHICLE_71 Actor.LockInCurrentPosition($PLAYER_ACTOR) = TrueActor.SetImmunities($PLAYER_ACTOR, 1, 1, 1, 1, 1)Player.CanMove($PLAYER_CHAR) = Falsejump @VEHICLE_1336 :VEHICLE_163wait 0 if Player.Defined($PLAYER_CHAR)jf @VEHICLE_222 if not Car.Wrecked([email protected])jf @VEHICLE_222 if or00E1: player 0 pressed_key 16 00E1: player 0 pressed_key 15 jf @VEHICLE_281 :VEHICLE_222Player.CanMove($PLAYER_CHAR) = TrueActor.SetImmunities($PLAYER_ACTOR, 0, 0, 0, 0, 0)Actor.LockInCurrentPosition($PLAYER_ACTOR) = FalseCar.DoorStatus([email protected]) = 1Car.RemoveReferences([email protected])03F0: enable_text_draw 0 03E6: remove_text_box wait 250 jump @VEHICLE_71 :VEHICLE_281if 00E1: player 0 pressed_key 0 jf @VEHICLE_575 jump @VEHICLE_305 :VEHICLE_3050494: get_joystick 0 data_to [email protected] [email protected] [email protected] [email protected] if [email protected] == 0 jf @VEHICLE_346 jump @VEHICLE_575 :VEHICLE_346if [email protected] > 0 jf @VEHICLE_383 [email protected] += 1 wait 500 jump @VEHICLE_420 :VEHICLE_383if 0 > [email protected] jf @VEHICLE_420 [email protected] -= 1 wait 500 jump @VEHICLE_420 :VEHICLE_420if 1 > [email protected] jf @VEHICLE_445 [email protected] = 3 :VEHICLE_445if [email protected] > 3 jf @VEHICLE_470 [email protected] = 1 :VEHICLE_470if [email protected] == 1 jf @VEHICLE_505 [email protected] = 40.0 jump @VEHICLE_994 :VEHICLE_505if [email protected] == 2 jf @VEHICLE_540 [email protected] = 55.0 jump @VEHICLE_994 :VEHICLE_540if [email protected] == 3 jf @VEHICLE_994 [email protected] = 80.0 jump @VEHICLE_994 :VEHICLE_575if 0AB0: key_pressed 48 jf @VEHICLE_604 [email protected] = 0 jump @VEHICLE_865 :VEHICLE_604if 0AB0: key_pressed 49 jf @VEHICLE_633 [email protected] = 1 jump @VEHICLE_865 :VEHICLE_633if 0AB0: key_pressed 50 jf @VEHICLE_662 [email protected] = 2 jump @VEHICLE_865 :VEHICLE_662if 0AB0: key_pressed 51 jf @VEHICLE_691 [email protected] = 3 jump @VEHICLE_865 :VEHICLE_691if 0AB0: key_pressed 52 jf @VEHICLE_720 [email protected] = 4 jump @VEHICLE_865 :VEHICLE_720if 0AB0: key_pressed 53 jf @VEHICLE_749 [email protected] = 5 jump @VEHICLE_865 :VEHICLE_749if 0AB0: key_pressed 54 jf @VEHICLE_778 [email protected] = 6 jump @VEHICLE_865 :VEHICLE_778if 0AB0: key_pressed 55 jf @VEHICLE_807 [email protected] = 7 jump @VEHICLE_865 :VEHICLE_807if 0AB0: key_pressed 56 jf @VEHICLE_836 [email protected] = 8 jump @VEHICLE_865 :VEHICLE_836if 0AB0: key_pressed 57 jf @VEHICLE_994 [email protected] = 9 jump @VEHICLE_865 :VEHICLE_865if [email protected] == 1 jf @VEHICLE_908 0085: [email protected] = [email protected] // (int) [email protected] = 40.0 jump @VEHICLE_994 :VEHICLE_908if [email protected] == 2 jf @VEHICLE_951 0085: [email protected] = [email protected] // (int) [email protected] = 55.0 jump @VEHICLE_994 :VEHICLE_951if [email protected] == 3 jf @VEHICLE_994 0085: [email protected] = [email protected] // (int) [email protected] = 80.0 jump @VEHICLE_994 :VEHICLE_99403F0: enable_text_draw 1 033F: set_text_draw_letter_size 1.0 3.8 045A: draw_text_1number 30.0 150.0 GXT 'NUMBER' number [email protected] // ~1~033F: set_text_draw_letter_size 1.0 3.8 045A: draw_text_1number 50.0 150.0 GXT 'NUMBER' number [email protected] // ~1~033F: set_text_draw_letter_size 1.0 3.8 045A: draw_text_1number 70.0 150.0 GXT 'NUMBER' number [email protected] // ~1~033F: set_text_draw_letter_size 1.0 3.8 033E: set_draw_text_position [email protected] 165.0 GXT 'PAGE_00' // [email protected] *= 100 [email protected] *= 10 0085: [email protected] = [email protected] // (int) 005A: [email protected] += [email protected] // (int) 005A: [email protected] += [email protected] // (int) [email protected] /= 100 [email protected] /= 10 if or0AB0: key_pressed 48 0AB0: key_pressed 49 0AB0: key_pressed 50 0AB0: key_pressed 48 0AB0: key_pressed 49 0AB0: key_pressed 50 0AB0: key_pressed 51 jf @VEHICLE_1235 jump @VEHICLE_1277 :VEHICLE_1235if or0AB0: key_pressed 52 0AB0: key_pressed 53 0AB0: key_pressed 54 0AB0: key_pressed 55 0AB0: key_pressed 56 0AB0: key_pressed 57 jf @VEHICLE_163 jump @VEHICLE_1277 :VEHICLE_1277if 18631 > [email protected] jf @VEHICLE_1304 [email protected] = 19031 :VEHICLE_1304if [email protected] > 19031 jf @VEHICLE_1331 [email protected] = 18631 :VEHICLE_1331Car.Destroy([email protected]):VEHICLE_1336Model.Load([email protected]):VEHICLE_1341wait 0 if Model.Available([email protected])jf @VEHICLE_1341 04C4: store_coords_to [email protected] [email protected] [email protected] from_actor $PLAYER_ACTOR with_offset 0.0 5.5 0.3 [email protected] = Actor.Angle($PLAYER_ACTOR)[email protected] += 270.0 [email protected] = Car.Create([email protected], [email protected], [email protected], [email protected])Car.Angle([email protected]) = [email protected]([email protected])077E: get_active_interior_to [email protected] if not [email protected] == 0 jf @VEHICLE_1469 0840: link_car [email protected] to_interior [email protected] :VEHICLE_146903F0: enable_text_draw 1 wait 50 03F0: enable_text_draw 0 wait 50 033F: set_text_draw_letter_size 1.0 3.8 045A: draw_text_1number 50.0 150.0 GXT 'NUMBER' number [email protected] // ~1~wait 500 jump @VEHICLE_163 Edited January 17, 2012 by SomeGuy86 Link to comment Share on other sites More sharing options...
ZAZ Posted January 17, 2012 Share Posted January 17, 2012 I didn't try to understand what the script does with [email protected], [email protected], [email protected] I allready made a script to spawn 20 added cars by reading the ID from an ini file: AddCar_spawner Another one, done by fastman for cleo4: Car Spawner By Fastman92 , more complex with possibility to config more things and the chance to spawn as much cars as you like CLEO MODS CLEO Script Tutorial Link to comment Share on other sites More sharing options...
SomeGuy86 Posted January 18, 2012 Author Share Posted January 18, 2012 I didn't try to understand what the script does with [email protected], [email protected], [email protected]I allready made a script to spawn 20 added cars by reading the ID from an ini file: AddCar_spawner Another one, done by fastman for cleo4: Car Spawner By Fastman92 , more complex with possibility to config more things and the chance to spawn as much cars as you like OK, thanks! I knew about your spawner, I already used it to test all of my custom-added cars, but I wanted something more specifically, where I could easily tweak the range, amount of vehicles that are able to spawn... So guess I'll be going with the other one, it does pretty much what I needed 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