[Include] [INC] x_racing (Racing Include)
#1

=][= SA-MP RACING INCLUDE =][=
Here is a nice selection of extra ways to improve your racing script, to be honest
this is aimed at Racing, but I'm sure Freeroams, Stunt and even roleplaying scripts
could benefit from my functions.
Don't forget to add this to the top of your script:
Код:
#include <x_racing>
FEATURES
native OnPlayerCarJack(playerid, vehicleid, ispassenger);
This should be placed under OnPlayerEnterVehicle, punishment is death. Can easily be changed.
native AutoUpgrade(modelID,vehicleID);
This can be placed in a command or a funtion, for example...
Код:
dcmd_upgrade(playerid, params[])
{
	#pragma unused params
	return AutoUpgrade(GetVehicleModel(GetPlayerVehicleID(playerid)),GetPlayerVehicleID(playerid));
}
native IsVehicleInvalidPaintable(vehicleid);
This helps if you don't want/need certian vehicles to change colour, for example taxis, cop cars etc.
native IsVehicleBigSize(vehicleid);
native IsVehicleSmallSize(vehicleid);
The above two functions find out how big the vehicle is.
native IsVehicleInvalidNosVehicle(vehicleid);
This makes sure vehicles which can't have Nos, don't get Nos.
native IsVehicleRimsVehicle(vehicleid);
This asks if the vehicle can have new wheels.
native IsVehiclePassengerVehicle(vehicleid);
This asks if they vehicle can have passengers.
native IsVehicleInvalidSOSVehicle(vehicleid);
SOS is our rescue system, but basically it asks if the vehicle has the F2 special feature like landing wheels for planes.
native IsVehiclePaintJOBVehicle(vehicleid);
There are about 15 vehicles that can have the cool paintjobs.
native PlayerIp(playerid);
native PlayerName(playerid);
Nice to have the above, saves all the formatting.
native SetVehicleRepair(playerid,vehicleid);
Repairs vehicle fully, like body parts and plane wings.
native SetVehicleNitro(vehicleid,enabled,type);
Good for giving vehicles different Nos, it also removes nitro.
*enabled - 1 = true, 0 = false.Types are 1008,1009 and 1010.

native SetVehiclePaintJob(vehicleid,vehiclecheck,type);
Good for giving vehicles different paintjobs.
*vehiclecheck - 1 = true, 0 = false.Types are 0,1,2,3.

native SetVehicleLocation(vehicleid, Float, Float:y, Float:z, Float:a, interior, world);
native SetPlayerLocation(playerid, Float, Float:y, Float:z, Float:a, interior, world);
Perhaps not needed, but this saves a lot of time if you are switches between multiple worlds, like AdrenalineX :P

Pastebin :
http://pastebin.com/f48175d68
SendSpace :
http://www.sendspace.com/file/6i4kqs
Reply
#2

Hi,
Nice Include, but thats Vehicle Functions and it has
nothing to do with Racing ^^

- LJ
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)