29.06.2011, 02:06
Try moving it to this callback, if it's not a callback, just copy this and put it somewhere not on OnGameModeInIt:
This has not been tested.
pawn Код:
public OnPlayerUpdate(playerid) // Update CallBack
{
if(IsPlayerInAnyVehicle(playerid)
{
new Float:vhealth;GetVehicleHealth(GetPlayerVehicleID(playerid),vhealth);
if(vhealth<250)
{
RepairVehicle(GetPlayerVehicleID(playerid));
SetVehicleHealth(GetPlayerVehicleID(playerid),999);
GameTextForPlayer((playerid,"~g~Auto ~w~Fix",1500,3);
}
}
return 1; // Send this update to other players.
}