10.12.2014, 12:36
pawn Код:
enum pInfo
{
Vehicle,
VehicleModel
};
new PlayerInfo[MAX_PLAYERS];
// after loading player's stats
if(PlayerInfo[playerid][VehicleModel])
PlayerInfo[playerid][Vehicle] = CreateVehicle(PlayerInfo[playerid][VehicleModel], x, y, z ...);
// command for turning the engine on/off
if(PlayerInfo[playerid][Vehicle] == GetPlayerVehicleID(playerid)) // if the player's vehicle id is equal to created vehicle
{
SetVehicleParamsEx(....);
}