18.06.2009, 21:59
I didn't mean 'basics' like scripting basics.. I meant for your timer
Like that..
pawn Код:
forward CarHealthTimer();
public CarHealthTimer()
{
for (new i=0; i < MAX_PLAYERS; i++)
{
if (IsPlayerConnected(i) && IsPlayerInAnyVehicle(i))
{
new Float:current[MAX_PLAYERS];
GetVehicleHealth(GetPlayerVehicleID(i),current[i]);
if(current[i] < oldhealth[i]) { // action
}
// then you overwrite your old health..
oldhealth[i] = current[i];
}
}
}