12.09.2012, 06:43
pawn Код:
public OnPlayerStateChange(playerid, newstate, oldstate)
{
if(newstate == PLAYER_STATE_DRIVER)
{
new Float: health;
new veh;
veh = GetPlayerVehicleID(playerid);
if(GetVehicleHealth(veh,health) < 1000) //Max vehicle health is 1000 not 100.
{
RepairVehicle(playerid);
}
}
return 1;
}