10.01.2014, 12:07
<----
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);
}
}
}
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);