24.03.2011, 21:23
(
Последний раз редактировалось kurta999; 08.04.2011 в 09:53.
)
Vehicle Functions
This is very useful include. I took some functions from MTA, and some written by me. It's not irregular, because MTA is open source project. Changes:
0.2.1:
• Added GetVehicleName.
• Added GetVehicleModelIDFromName
• R2: Some bug fixes.
0.2:
• Added GetVehicleParamsEx bug fix.
• Added GetVehicleInterior.
• Added GetVehicleColor.
• Added GetVehiclePaintjob.
0.1.1:
• Added IsLicensePlate.
• Added GetVehicleComponentTypeName.
Functions:
pawn Код:
native IsValidVehicle(vehicleid);
native IsValidModel(modelid);
native IsUpgrade(modelid);
native GetVehicleType(modelid);
native GetMaxPassengers(modelid);
native IsUpgradeCompatible(_Model, _Upgrade);
native IsLicensePlate(vehicleid);
native GetVehicleComponentTypeName(component);
native GetVehicleInterior(vehicleid);
native GetVehicleColor(vehicleid, color1, color2);
native GetVehiclePaintjob(vehicleid);
native GetVehicleName(vehicleid);
native GetVehicleModelIDFromName(const vname[]);
Click
Hungarian Version
GVar Plugin You need this plugin, without this not work.
Note:
You must put this in your code.
pawn Код:
public OnVehicleRespray(playerid, vehicleid, color1, color2)
{
SetGVarInt("CarColor_1", color1, vehicleid);
SetGVarInt("CarColor_2", color2, vehicleid);
return 1;
}
public OnVehiclePaintjob(playerid, vehicleid, paintjobid)
{
SetGVarInt("Veh_Paintjob", paintjobid, vehicleid);
return 1;
}
public OnVehicleSpawn(vehicleid)
{
SetGVarInt("Bonnet_Ex", VEHICLE_PARAMS_UNSET, vehicleid);
SetGVarInt("Boot_Ex", VEHICLE_PARAMS_UNSET, vehicleid);
return 1;
}