[FilterScript] [FS] Simple Car commands (/lock /purchase /eject)
#1

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"
Reply
#2

possible saver ? save ur car ?
Reply
#3

No sorry, this is a simple car commands filterscritp, just for helping begginers. What you ask for is a littlemore complicated and <TaXi> have already made it, you should see his work.
http://forum.sa-mp.com/index.php?topic=25820.0

See you later!
Reply
#4

Saving cars is not complicated at all, refer here to find all you need to use to do it .
Reply
#5

hi i like this but i think i find a bug... wen i try to eject m slef (whit /eject id) it eject me and thats okay i think but wen i put /ejectall it ajectme too! how can i fix that?
Reply
#6

Hi!
change this line
Code:
if   ((IsPlayerConnected(i))&&(IsPlayerInVehicle(i,vehicleid)))
and make it like this one:
Code:
if   ((IsPlayerConnected(i))&&(IsPlayerInVehicle(i,vehicleid))&&(i!=playerid))
See you later!
Reply
#7

Thanks good fs
Reply
#8

hehe nice script zeruel...i was wandering if i could maybe integrate some of your ejectplayer commands into my new FS version...I'm thinking about adding a banplayerfromvehiclecommand to stop a certain player from entering a person's owned vehicle and ive had trouble getting my own design of eject commands to work ok lol, take a look at my new version and lemmi no wat u think, U can find my new FS HERE...i won't add ur stuff in unless i get ur permission
Reply
#9

OF COURSE YOU CAN MAN!

BTW the /eject thing, I took it from another place, so you don't need to give me credit ether, the only thing I did, was to to place all them in the same file, and linke them with the own system + auto-lock-car feacture to make the car always lock. So unless you use this into your FS, you only have to gave them credit:
Quote:
Originally Posted by zeruel_angel
BTW anyone can use any of my files, if not, I woudn't have released them.

See you later pal! keep up the good work!
Reply
#10

Nice stuff. You are fliping facking script master
Reply
#11

Hi well i want to now if you can make a save sys car too because that link you give us well xD i dont want mi cars out of the script you now and well xD can you make a sys to save cvars please...?
Reply
#12

Quote:
Originally Posted by almighty
Hi well i want to now if you can make a save sys car too because that link you give us well xD i dont want mi cars out of the script you now and well xD can you make a sys to save cvars please...?
I don't really understand the entire post... can you please say it again in a diferent way?
BTW yes I can make a save system, in fact I have been using one in my private server for a while, but it is not finished and is not easy to integrate even when it is a FS. When I have finished testing and developing it, I will release it.

See you later!
Reply
#13

Quote:
Originally Posted by zeruel_angel
Quote:
Originally Posted by almighty
Hi well i want to now if you can make a save sys car too because that link you give us well xD i dont want mi cars out of the script you now and well xD can you make a sys to save cvars please...?
I don't really understand the entire post... can you please say it again in a diferent way?
BTW yes I can make a save system, in fact I have been using one in my private server for a while, but it is not finished and is not easy to integrate even when it is a FS. When I have finished testing and developing it, I will release it.

See you later!
Let's see if I understood it...

The car system offered here... you can buy, sell, lock cars... but only in one section?

Does the car belong to you after quiting the server and entering again?

And Can we do something like /parkcar to determine where the car will be at next spawn after leaving the server or the car being destroyed...

Thanks !
Reply
#14

Quote:
Originally Posted by rodrigoscf
Let's see if I understood it...

The car system offered here... you can buy, sell, lock cars... but only in one section?

Does the car belong to you after quiting the server and entering again?

And Can we do something like /parkcar to determine where the car will be at next spawn after leaving the server or the car being destroyed...

Thanks !
Sorry, no. This is a very simple FS, with this, the car belongs to you as long you remain in the server. I'm working in a System with /park and some other stuff, but i didn't released it yet. I will. I promise.

See you later!
Reply
#15

You should add a define in top or somthing like:
save_to_file 1
if 1 it saved the info to a file so a purchased car always stays purchased

Don't know alot yet about saving to file and so
Reply
#16

Quote:
Originally Posted by Skittle
You should add a define in top or somthing like:
save_to_file 1
if 1 it saved the info to a file so a purchased car always stays purchased

Don't know alot yet about saving to file and so
xD I wish it could be so easy. Anyway i have finished the park FS I will release it as soon as my friends finish testing it.
it is a little tricky to set up, but easy to use, I hope you like it when It get released.

See you later!
Reply
#17

nice job zeruel!!!!
Reply
#18

I sure wish this would work without the .amx? It won't load into my server because there is no .amx..
Reply
#19

Compile it and you will get a .amx file!!!!!
Reply
#20

Very usefull! But, if I buy a car, exit and then come back on, it is still mine huh?
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)