25.05.2010, 23:08
Joe's Vehicle Hire System 2.0
What does it do?
With this vehicle you can add Hireable vehicles easily with one line.
When you get into a hire vehicle, A message will pop up saying it's a Hire vehicle.
And will list the commands availbe.
When you type '/hire' in a unhired hire vehicle:
And so on..
Changes in V2.0:
You can hire a vehicle for a certin amount of time which is defined in the CreateHireVehicle code.
When there's one minute until rent time expiry, A message will say so.
You will automaticly return the vehicle once the Time expiry has been reached.
Changes in V3.0:
Optimized code.
VehicleID conflicts upon GMX fixed. - Not 100% sure, /v still causes bugs.
When you destroy your vehicle, it will be returned.
USES ZCMD.
USES SSCANF2.
SCRIPTS:
-> ZCMD <--> SSCANF2 <-
-> FOREACH <-
Sounds good, so how do I do it?
Firstly, download the script from the download link below.
Seconly, once you've installed it, open up 'Hire.pwn'.
Then find the 'public OnFilterScriptInit()' callback.
Inside this callback is where you create your Hire Vehicles.
I have made 4 examples.
V1.1:
pawn Code:
/*CreateHireVehicle(ModelID, X, Y, Z, Rotation, Color1, Color2, Price);*/
CreateHireVehicle(451, 524.259704, -1290.022094, 16.948589, 310.302642, 15, 15, 3000); // Grotti ~ Turismo Hire
CreateHireVehicle(451, 534.313842, -1290.038574, 16.948661, 314.290283, 15, 15, 3000); // Grotti ~ Turismo Hire
CreateHireVehicle(506, 552.631225, -1289.209838, 16.835329, 1.806509, 15, 15, 2800); // Grotti ~ SuperGT Hire
CreateHireVehicle(415, 564.112976, -1277.986083, 17.014154, 102.518310, 15, 15, 2500); // Grotti ~ Cheetah Hire
V2.0:
pawn Code:
/*CreateHireVehicle(ModelID, X, Y, Z, Rotation, Color1, Color2, Price, Time(IN MINUTES!!!));*/
CreateHireVehicle(451, 524.259704, -1290.022094, 16.948589, 310.302642, 15, 15, 3000, 60); // Grotti ~ Turismo Hire
CreateHireVehicle(451, 534.313842, -1290.038574, 16.948661, 314.290283, 15, 15, 3000, 60); // Grotti ~ Turismo Hire
CreateHireVehicle(506, 552.631225, -1289.209838, 16.835329, 1.806509, 15, 15, 2800, 60); // Grotti ~ SuperGT Hire
CreateHireVehicle(415, 564.112976, -1277.986083, 17.014154, 102.518310, 15, 15, 2500, 60); // Grotti ~ Cheetah Hire
You can make as many as you want.
Nice, so, are there any bugs?
There are no bugs with this script, however if you use a vehicle spawner, this may cause conflictions.
So what are the commands?
Hire version:
/Hire
/Unhire
/Exitveh
BONUS: /Hireveh - Type /hireveh ingame to see more info.
Rent version:
/Rent
/Unrent
/Exitveh
BONUS: /Hireveh - Type /hireveh ingame to see more info.
Credits:
ME, because if I didn't script this, it wouldn't be here.
'Grim_' Coding help in Scripting Discussions.
'Kyosaur!!!' Coding help over MSN.
'Guedes' Testing.
Download V1.1:
Hire version:
Rent version:
Download V2.0:
Hire version:
Rent version:
Download V3.0:
USES ZCMD.
USES SSCANF2.
SCRIPTS:
Hire version:
Rent version: