SA-MP Forums Archive
[FilterScript] [FS] Car System [Car Ownership + Fuel + Speedo] (Ideal for RPG) - Printable Version

+- SA-MP Forums Archive (https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Filterscripts (https://sampforum.blast.hk/forumdisplay.php?fid=17)
+--- Thread: [FilterScript] [FS] Car System [Car Ownership + Fuel + Speedo] (Ideal for RPG) (/showthread.php?tid=98074)

Pages: 1 2 3 4


[FS] MYSQL* based Vehicle System [Vehicle Ownership + Fuel + Speedo] (Ideal for RPG) - RaFsTar - 19.09.2009

MYSQL+PHP* based Vehicle System

Same FS as the old one but with MYSQL and a Web Page* integrated !


This FS includes a Vehicle Ownership, fuel, and speed system ideal for RPG servers.


The cmds available are:

/buycar: CMD to buy an unbought car
/sellcar: CMD to sell your current vehicle (you must be inside it)
/whereismycar: CMD to locate your current vehicle
/callmycar: CMD to teleport your current vehicle to you (you lose 100 § by default) RCON ADMIN IS FREE OF TAX
/lockmycar : CMD to lock your car, so when you're online nobody can drive it
/mycars : CMD to see the cars you own and their ID
/carhelp: CMD to see the available cmds

Rcon admin cmds:

/callmycar
/setcarowner
/setcarprice
/setpark


How to add a vehicle?

Code:
AddVehicle(Carid, Carmodel, Carcolor1, Carcolor2, Float:CarX, Float:CarY, Float:CarZ, Float:CarA, CarCost, CarSell)

Carid is UNIQUE, so it can only exist ONE id for ONE vehicle.
Carmodel is the model of the vehicle.
Carcolor1 is the color 1 of the vehicle.
Carcolor2 is the color 2 of the vehicle.
CarX is the X position of the vehicle.
CarY is the Y position of the vehicle.
CarZ is the Z position of the vehicle.
CarA is the A position of the vehicle.
CarCost is the price of the vehicle.
CarSell is the sell price of the vehicle (should be 1/2 of CarCost, if you buy it at 1000 you sell it at 500).
There are already 135 vehicles added, you just need to be patient and add others where you want them.



When:

You leave a vehicle (if it's owned by you) the vehicle position is auto saved and the car will spawn there until you drive it to another place.

You paint a vehicle (if it's owned by you) the vehicle paint will be auto saved and the car will spawn with those colours until you paint it again.

You mod a vehicle the mod is NOT saved (I won't script this) !




About Installing the FS:

You will need a MySQL server.
On that MySQL server you will create a database that will be used by this FS.

Add the plugin in your server.cfg, if you are using linux download the correct version @ https://sampforum.blast.hk/showthread.php?tid=122983

Install the FS, change what's needed :

Code:
#define DB_HOST "" Host of the MySQL server
#define DB_USER "" User of the MySQL server
#define DB_PASSWORD "" Pass of the MySQL server
#define DB_NAME "" Database of MySQL server
Compile it and start the server, if it starts without any error you're good to go else post here !



About Installing the Web page:

Install the files in your site.

Change "connection/connection.php with your database data"

You are good to go !


Download is attached to the topic.




Have fun,
Rafstar 8Ю


Re: [FS] Car System [Car Ownership + Fuel + Speedo] (Ideal for RPG) - Takumi.WS - 19.09.2009

Nice
Good Work


Re: [FS] Car System [Car Ownership + Fuel + Speedo] (Ideal for RPG) - RaFsTar - 19.09.2009

Quote:
Originally Posted by Takumi[URP
]
Nice
Good Work
Thanks.


Re: [FS] Car System [Car Ownership + Fuel + Speedo] (Ideal for RPG) - Adil - 19.09.2009

Great work.

Regards, Adil.


Re: [FS] Car System [Car Ownership + Fuel + Speedo] (Ideal for RPG) - RaFsTar - 19.09.2009

Quote:
Originally Posted by Adil_Rahoo
Great work.

Regards, Adil.
Thanks & regards.


Re: [FS] Car System [Car Ownership + Fuel + Speedo] (Ideal for RPG) - Beremix - 19.09.2009

nice


Re: [FS] Car System [Car Ownership + Fuel + Speedo] (Ideal for RPG) - HACKHERS - 19.09.2009

Nice Script.

You Can Add Codes Like
/give vKey1 [ID]
/give vKey2 [ID]
And
/Whereismycar


Re: [FS] Car System [Car Ownership + Fuel + Speedo] (Ideal for RPG) - RaFsTar - 19.09.2009

Quote:
Originally Posted by HACKHERS
Nice Script.

You Can Add Codes Like
/give vKey1 [ID]
/give vKey2 [ID]
And
/Whereismycar
Yes i can, but i think you must remember where you left your car.
But i can make it.


Re: [FS] Car System [Car Ownership + Fuel + Speedo] (Ideal for RPG) - HACKHERS - 19.09.2009

Quote:

Yes i can, but i think you must remember where you left your car.
But i can make it.

You Can use Define asks if turn off He or She Change Like false..

My English is Very Bad


Re: [FS] Car System [Car Ownership + Fuel + Speedo] (Ideal for RPG) - mihais17 - 19.09.2009

Good script !


Re: [FS] Car System [Car Ownership + Fuel + Speedo] (Ideal for RPG) - Hiitch - 19.09.2009

Very good script, no offense, but I find the grammar poorly done (just one thing)

When it says " You got \'-$300\' " it should say

You spent "$300" instead, but then again, it\'s up to you !


Re: [FS] Car System [Car Ownership + Fuel + Speedo] (Ideal for RPG) - RaFsTar - 19.09.2009

New update released.

/callmycar - Call your car.
/whereismycar - Locates your car.

Best Regards.


Re: [FS] Car System [Car Ownership + Fuel + Speedo] (Ideal for RPG) - HACKHERS - 19.09.2009

Quote:
Originally Posted by RaFsTar
New update released.

/callmycar - Call your car.
/whereismycar - Locates your car.

Best Regards.
Thanks For Listening Me Btw You Can Add /mycars I Have got very much ideas


Re: [FS] Car System [Car Ownership + Fuel + Speedo] (Ideal for RPG) - RaFsTar - 19.09.2009

Quote:
Originally Posted by HACKHERS
Quote:
Originally Posted by RaFsTar
New update released.

/callmycar - Call your car.
/whereismycar - Locates your car.

Best Regards.
Thanks For Listening Me Btw You Can Add /mycars I Have got very much ideas
I made it to only own a car, if you changed to own more than one you will need to change all car ownership.


Re: [FS] Car System [Car Ownership + Fuel + Speedo] (Ideal for RPG) - [XST]O_x - 19.09.2009

gj


Re: [FS] Car System [Car Ownership + Fuel + Speedo] (Ideal for RPG) - Hash - 19.09.2009

Nice Work


Re: [FS] Car System [Car Ownership + Fuel + Speedo] (Ideal for RPG) - Azur - 19.09.2009

Nice job...but you should do better text...Something cool...i think on text...you by the car...and that


Re: [FS] Car System [Car Ownership + Fuel + Speedo] (Ideal for RPG) - RaFsTar - 19.09.2009

Quote:
Originally Posted by Azur
Nice job...but you should do better text...Something cool...i think on text...you by the car...and that
What ??


Re: [FS] Car System [Car Ownership + Fuel + Speedo] (Ideal for RPG) - [NYRP]Mike. - 19.09.2009

He means when you purchase the car, there should be better brighter colours maybe use
Code:
GameTextForPlayer(playerid, "You Purchase the Vehicle!", 300, 1);
Only a Suggestion,

-Mike.


Re: [FS] Car System [Car Ownership + Fuel + Speedo] (Ideal for RPG) - RaFsTar - 19.09.2009

Quote:
Originally Posted by [NYRP
Mike. ]
He means when you purchase the car, there should be better brighter colours maybe use
Code:
GameTextForPlayer(playerid, "You Purchase the Vehicle!", 300, 1);
Only a Suggestion,

-Mike.
Oh yeah lol !
I think you can read the message it says, when you buy a car.

If you wanna add extra things, it\'s up to you, but keep my credits. :P

Regards.