KillTimer
#1

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;
}
Reply


Messages In This Thread
KillTimer - by SnG.Scot_MisCuDI - 15.07.2014, 18:58
Re: KillTimer - by Blast3r - 15.07.2014, 19:00
Re: KillTimer - by Smileys - 15.07.2014, 19:00
Re: KillTimer - by SnG.Scot_MisCuDI - 15.07.2014, 19:14

Forum Jump:


Users browsing this thread: 2 Guest(s)