23.03.2012, 00:56
Quote:
PHP код:
|
PHP код:
SetTimer("carcheck", 1000, true); // sets a 1 second timer on repeat put this under OnGameModeInit
forward carcheck()
public carcheck()
{
for(new i=0; i<MAX_PLAYERS, i++)
{
new vehicle, Float:health;
vehicle = GetPlayerVehicleID(playerid);
GetVehicleHealth(vehicle, health);
if(health < 300)
{
SetVehicleHealth(vehicleid, 300.0); //it's about destroying
SendCientMessage(playerid, 0xFFFFFF, "text");
}
}
return 1;
}