View Single Post
Maxximou5
AlliedModders Donor
Join Date: Feb 2013
Old 09-12-2015 , 07:18   Re: Warning countdown
Reply With Quote #3

Here's an actual example of using the PrintHintText for a countdown.
Code:
int Time = 10;

public Action Timer_CountDown(Handle timer, any client)
{
    if (!IsClientInGame(client) || !IsPlayerAlive(client))
        return Plugin_Stop;

    PrintHintText(client, "Warning!\nSomething will happen in: %i seconds", Time);
    Time--;

    if (Time <= 1)
    {
        return Plugin_Stop;
    }
    return Plugin_Continue;
}

Last edited by Maxximou5; 09-12-2015 at 07:20.
Maxximou5 is offline