25.09.2014, 22:58
Example
OnPlayerUpdate
pawn Код:
new Float:vHealth[MAX_VEHICLES];
new OneSecond[MAX_PLAYERS];
pawn Код:
static timee, ID;
timee = gettime();
if(OneSecond[playerid] < timee)
{
OneSecond[playerid] = timee;
ID = GetPlayerVehicleID(playerid);
if(ID)
{
static Float:vHP;
GetVehicleHealth(ID, vHP);
if(vHP != vHealth[ID])
{
vHealth[ID] = vHP;
// health changes
}
}
}