11.08.2007, 18:37
Simple Car commands
CREDITS:pekay http://forum.sa-mp.com/index.php?topic=26414.0
Allan (/lock /unlock and strtok) http://forum.sa-mp.com/index.php?top...18858#msg18858
Joshua Yu (/purchase and /callmycar) http://forum.sa-mp.com/index.php?top...22605#msg22605
Alfredk (/eject) http://forum.sa-mp.com/index.php?topic=26402
Since a lot of ppl (scripter beginers) are asking for this commands, I have packed all them in a single filterscritp and also added some extra funtionalityes.
Command list:
/purchase (to buy a car)
/sellmycar (to sell your car, you can use it in any moment)
/lock (to lock a car)
/unlock (to unlock a car)
/eject [playerid] (to eject a player from your car)
/ejectall (to eject all passengers from a car)
If you lock a car that doesn't belongs to you, when you exit it, it will auto unlock, you can only lock forever YOUR car.
When you sell a car, the car will auto unlock
When you enter another player car you will get a message saying "This vehicle belongs to: <owner name>"
when you exit the server, you loose your car and it wil auto unlock.
You can change CAR PRICE editing line 17 "#define CAR_COST 50000" where 50000 is the car price.
PASTEBIN LINK
CarCMD.pwn -> http://pastebin.com/f75078355
This is a FilterScript, to use it, you have to create a new EMPTY PWN file, them copy ALL of it inside, save the file with any name for example "CarCMD.pwn" put it into "FilterScript" folder and finally open "server.cfg" with your notepad and add your file name with out ".pwn" for example "CarCMD" (without quotes) and the end of the line that starts with the word "FilterScripts"
Enjoy!
See you later
EDIT: NEW VERSION! last one have a bug with "/callmycar"