How To: Spawn and Save vehicles

From SA-MP Wiki

Jump to: navigation, search


0.3b saves savedpositions.txt as-well as screenshots in your GTA SA User Files folder (My Documents)

Hi there, my name is Wouter and i will make some tutorials for you. Lets begin now

Step 1: Open your GTA San Andreas folder ((Default: C:\Program Files\Rockstar Games\GTA San Andreas))

Step 2: Open Samp_Debug, Click Launch Debug.

Step 3: When the game starts you will Spawn as CJ, lets start placing and saving some cars.

Step 3a: Place a vehicle by using /v [name/modelid] or /vsel, and use /save to save the position ((You must be inside the vehicle to do so))

Step 4: Place as many vehicles as you wish, but note there is a limit of 2000 Vehicles. Placing more may crash the server.

Step 5: After you have placed vehicles, Alt+Tab or quit the game.

Step 6: Go to your 'My Documents' folder, then GTA San Andreas User File, them go into SAMP and in there you should find: savedpositions(.txt file)

Step 6a: Inside, you will see some code, which i will now explain: AddStaticVehicle(Modelid, X, Y, Z, Angle, color1, color2); its actually pretty simple to make.

Step 7: Copy the vehicles and place them in your script under OnGameModeInit ((OnFilterScriptInit if its a filterscript))

Step 8: Compile it, then place it in your gamemodes Folder, open server.cfg and edit the line gamemode0 to what you named your gamegode

Step 9: Thanks for reading, you can ALWAYS PM me on the SA-MP Forums, my name is laserhel50.

Personal tools