SA-MP Forums

Go Back   SA-MP Forums > SA-MP Scripting and Plugins > Filterscripts

Reply
 
Thread Tools Display Modes
Old 11/08/2007, 06:37 PM   #1
zeruel_angel
Huge Clucker
 
Join Date: Nov 2006
Posts: 245
Reputation: 5
Default [FS] Simple Car commands (/lock /purchase /eject)

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"
zeruel_angel is offline   Reply With Quote
Old 11/08/2007, 10:30 PM   #2
EvilWind
Little Clucker
 
Join Date: Jun 2007
Posts: 38
Reputation: 1
Default Re: [FS] Simple Car commands (/lock /purchase /eject)

possible saver ? save ur car ?
EvilWind is offline   Reply With Quote
Old 12/08/2007, 01:10 AM   #3
zeruel_angel
Huge Clucker
 
Join Date: Nov 2006
Posts: 245
Reputation: 5
Default Re: [FS] Simple Car commands (/lock /purchase /eject)

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!
zeruel_angel is offline   Reply With Quote
Old 18/08/2007, 12:41 AM   #4
BeckzyBoi
High-roller
 
Join Date: Dec 2006
Posts: 1,505
Reputation: 67
Default Re: [FS] Simple Car commands (/lock /purchase /eject)

Saving cars is not complicated at all, refer here to find all you need to use to do it .
BeckzyBoi is offline   Reply With Quote
Old 04/09/2007, 04:30 PM   #5
almighty
Big Clucker
 
Join Date: Aug 2007
Posts: 164
Reputation: 0
Default Re: [FS] Simple Car commands (/lock /purchase /eject)

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?
__________________
"This... is the way the world ends..." - "May Talos Guide You" - "Close Shut the Jaws... Of Oblivion!" - "Revelation 2:16, I am Alpha and Omega, The Beginning and the end. I Will give unto him that is athirs from the fountain of water of life freely" - "Death its a preferable alternative to Comunism" - "Embrace Democracy or you will be eradicated!"
almighty is offline   Reply With Quote
Old 04/09/2007, 04:39 PM   #6
zeruel_angel
Huge Clucker
 
Join Date: Nov 2006
Posts: 245
Reputation: 5
Default Re: [FS] Simple Car commands (/lock /purchase /eject)

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!
zeruel_angel is offline   Reply With Quote
Old 04/09/2007, 04:55 PM   #7
SylweK
Little Clucker
 
Join Date: Jul 2007
Posts: 3
Reputation: 0
Default Re: [FS] Simple Car commands (/lock /purchase /eject)

Thanks good fs
SylweK is offline   Reply With Quote
Old 05/09/2007, 01:33 AM   #8
cptnsausage
Gangsta
 
Join Date: Aug 2006
Posts: 802
Reputation: 5
Default Re: [FS] Simple Car commands (/lock /purchase /eject)

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
cptnsausage is offline   Reply With Quote
Old 05/09/2007, 04:20 AM   #9
zeruel_angel
Huge Clucker
 
Join Date: Nov 2006
Posts: 245
Reputation: 5
Default Re: [FS] Simple Car commands (/lock /purchase /eject)

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!
zeruel_angel is offline   Reply With Quote
Old 05/09/2007, 06:06 PM   #10
JaTochNietDan
High-roller
 
JaTochNietDan's Avatar
 
Join Date: Apr 2007
Location: Republic of Ireland
Posts: 4,301
Reputation: 357
Default Re: [FS] Simple Car commands (/lock /purchase /eject)

Nice stuff. You are fliping facking script master
__________________
Releases:
[Includes]: [jBan] | [jBanLite]
[Plugins]: [FileManager] | [Execute]
[Applications]: [Remote Administrator *NEW] | [Script King] | [RCON GUI]
[Tools]: [Random Spawn Array Generator]

Learn PAWN and more:
http://www.jatochnietdan.com


JaTochNietDan is offline   Reply With Quote
Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
[FilterScript] [FS]Simple Commands SunnyBoy Filterscripts 16 18/10/2014 01:52 PM
Simple Kidnap Or Lock Command Dmac_91 Help Archive 2 27/05/2009 09:27 AM
[FilterScript] [FS]Simple Lock/Unlock Car john9815 Filterscripts 11 14/03/2009 09:24 PM
nLock - Simple Lock System (Without SetVehicleParams) Norn Filterscripts 8 28/02/2009 12:11 AM


All times are GMT. The time now is 08:52 PM.


Powered by vBulletin® Version 3.8.6
Copyright ©2000 - 2014, Jelsoft Enterprises Ltd.