01.05.2015, 15:04
(
Последний раз редактировалось J4Rr3x; 10.02.2018 в 20:48.
)
J4Rr3x's Vehicles Functions
By J4Rr3x
Hi all, today i've made a some useful function for manage vehicles more easy. This is just first version, soon I'll update this include, if you have any ideas for new functions, please post them.By J4Rr3x
Natives:
pawn Код:
GetVehicleName(vehicleid)
GetVehicleModelName(modelid)
GetVehicleComponentName(componentid)
ToggleVehicleParams(vehicleid, params, bool: enable = true)
SetVehicleNumberPlateRandom(vehicleid)
FlipVehicle(playerid)
SetVehicleInterior(vehicleid, interiorid)
SetVehicleColor(vehicleid, color1, color2)
RespawnVehicle(vehicleid)
IsPlayerDriver(playerid)
IsVehicleOccupied(vehicleid)
GetNearestVehicle(playerid)
GetVehicleDriver(vehicleid)
pawn Код:
enum {
VEHICLE_PARAMS_TYPE_ALL,
VEHICLE_PARAMS_TYPE_ENGINE,
VEHICLE_PARAMS_TYPE_LIGHTS,
VEHICLE_PARAMS_TYPE_ALARM,
VEHICLE_PARAMS_TYPE_DOORS,
VEHICLE_PARAMS_TYPE_BONNET,
VEHICLE_PARAMS_TYPE_TRUNK,
VEHICLE_PARAMS_TYPE_OBJECTIVE,
VEHICLE_PARAMS_TYPE_SIREN
}
Код:
05/10/2015: - Some fix in code - Added IsValidVehicle if isn't already defined in gamemode - Added GetNearestVehicle(playerid) - Added GetVehicleDriver(vehicleid) 05/05/2015: (<- Thanks to ziggi) - Less memory for SetVehicleNumberPlateRandom - Added VEHICLE_PARAMS_TYPE_ALL - Add GetVehicleModelName - Checks for GetVehicleComponentName - Added IsVehicleOccupied 05/01/2015: - Made this include
BitBucket Page