Spawning Vehicles

From SA-MP

Jump to: navigation, search

Spawning Vehicles / by John Stuart

Contents

Using Debug

Ok, Go to the GTA:San Andreas main folder and run `samp_debug` and hit `run debug`. After this you can open a save game or a new game, just like in the singleplayer game. Though, you got the SA:MP chat, which you can use to activate certain commands. For example these vehicle spawn commands.

Commands:
/v [Model ID]
/vsel (For if you forgot the Model ID)
F11 and F12 to change the colors of the vehicle
/save to save the coordinates of the vehicle

Saving

Once you have set your vehicle on the good spot and gave it the right colors you will need to type `/save` to save the position of the vehicle. Than check your SA-MP folder there is Savedpositions.txt

Editing your script

Now you have saved you coordinates, go back to the GTA:SA main folder and look for the file `savedpositions.txt`, after you have opened this file you will see lines like AddStaticVehicle(...); Now open the program Pawno and go to file > open > [map of your choice] search for the callback OnGameModeInIt() and paste these lines between the { and }.

Now that you have inserted the vehicles, click `build` then `compile` now a box should display saying `Pawn compiler 3.0.3367 Copyright (c) 1997-2005, ITB CompuPhase` which is great. Now that is done go to where you loaded your pwn file usually `gamemodes > src > whatever.pwn` Now look for a .amx file with the same name as the pwn file and paste that into the map `gamemodes`.

Running

Wow, we are getting somewhere now, aren't we? Well, I can safely say that's the hard part over, phew I know! Now thats all done I tend to run "sampserver.exe" to just be sure and on the safe side, don't forget to set up your "server.cfg" to the right map!! Now place the files we just compiled into your server files from I dunno what you use I use "flashfxp" now simply Re-Start your server through the GTA Host panel and you're all ready on your map with your selected Spawn point.

Personal tools