15.07.2014, 18:58
Im having a problem with killing my timer.. Its excecuting the second timer but its not killing DrugHealth
pawn Код:
SetTimerEx("DrugHealth", 5_000, true, "if", playerid, h);
pawn Код:
public DrugHealth(playerid, float)
{
new Float:h;
GetPlayerHealth(playerid, h);
if(h < 100)
{
SetPlayerHealth(playerid, h+10);
Info[playerid][Grams]--;
}
else if (h >= 100) return SetTimerEx("DrugHealthDone", 1_000, false, "if",playerid, float);
return 1;
}
public DrugHealthDone(playerid, float)
{
SendClientMessage(playerid, COLOR_GREEN, "The drugs have replenished your health");
SetPlayerDrunkLevel(playerid, 0);
KillTimer(DrugHealth(playerid, float));
return 1;
}