04.11.2016, 10:32
Much more optimized version without all the redundant checks:
Edit: crap, didn't see the dates. Was looking at date of last post. Oh well.
PHP код:
public PlayersCheck()
{
for(new i = 0, j = GetPlayerPoolSize(), Float:vhealth; i <= j; i++)
{
if(GetVehicleHealth(GetPlayerVehicleID(i), vhealth))
{
if(vhealth < 450)
{
RemovePlayerFromVehicle(i);
}
}
}
}