[Include] [INC] Vehicle functions v0.2.1 R2
#1

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[]);
Download:

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;
}
Reply


Messages In This Thread
[INC] Vehicle functions v0.2.1 R2 - by kurta999 - 24.03.2011, 21:23
Re: [INC] Vehicle functions v0.2.1 R2 - by Lukas5852 - 24.03.2011, 21:32
Re: [INC] Vehicle functions v0.2.1 R2 - by s1k - 24.03.2011, 21:35
Re: [INC] Vehicle functions v0.2.1 R2 - by kurta999 - 24.03.2011, 21:36
Re: [INC] Vehicle functions v0.2.1 R2 - by Lukas5852 - 24.03.2011, 21:38
Re: [INC] Vehicle functions v0.2.1 R2 - by gamer931215 - 25.03.2011, 00:32
Re: [INC] Vehicle functions v0.2.1 R2 - by Ironboy - 25.03.2011, 05:54
Re: [INC] Vehicle functions v0.2.1 R2 - by [ProX]BlueFire - 25.03.2011, 07:46
Re: [INC] Vehicle functions v0.2.1 R2 - by kurta999 - 25.03.2011, 18:19

Forum Jump:


Users browsing this thread: 2 Guest(s)