19.09.2009, 00:53
(
Last edited by RaFsTar; 21/12/2011 at 07:49 PM.
Reason: New update!
)
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).
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
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.
Rafstar 8Ю