20.03.2012, 21:41
Try this:
pawn Код:
public OnGameModeInit()
{
SetTimer("PlayersCheck", 1000, true);
return 1;
}
forward PlayersCheck();
public PlayersCheck()
{
for(new i = 0; i <= GetMaxPlayers(); i++)
{
if(IsPlayerConnected(i))
{
if(isPlayerInAnyVehicle(i))
{
new vid, FLoat:vhealth;
vid = GetPlayerVehicleID(i);
GetVehicleHealth(vid, vhealth);
if(vhealth < 450)
{
RemovePlayerFromVehicle(i);
}
}
}
}
}