10.01.2014, 13:13
So do it like this:
pawn Код:
forward SomeTimer();
public SomeTimer()
{
for(new i, vehicleid; i < MAX_PLAYERS; i++)
{
if((vehicleid = GetPlayerVehicleID(i))) // Note: we want this assignment, so one '=' only.
{
new Float:vhp;
GetVehicleHealth(vehicleid, vhp);
if(vhp < 250.0)
{
SetVehicleHealth(vehicleid, 250.0);
}
}
}
}
Код:
SetTimer("SomeTimer", 1500, true);