Please wait before using this command*
#4

Quote:
Originally Posted by Anak
Посмотреть сообщение
any example simple?
Sure, Explanation inside

pawn Код:
CMD:delaytime(playerid, params[])
{//opening bracket
    static DelayTimer[MAX_PLAYERS]; //local or static variable, only for this function

    if(gettime() - DelayTimer[playerid] >= 1) //equals or more than 1
        return SendClientMessage(playerid, -1, "Error Message");//shows the error

    DelayTimer[playerid] = gettime() + 10; //get the server time and adds +10 seconds restriction.
    return true; // returns 1 or true
} // closing bracket
Reply


Messages In This Thread
Please wait before using this command* - by Anak - 20.12.2013, 16:26
Re: Please wait before using this command* - by Vince - 20.12.2013, 16:32
Re: Please wait before using this command* - by Anak - 20.12.2013, 16:34
Re: Please wait before using this command* - by Patrick - 20.12.2013, 16:44
Re: Please wait before using this command* - by Anak - 20.12.2013, 16:50
Re: Please wait before using this command* - by Anak - 20.12.2013, 17:02
Re: Please wait before using this command* - by Anak - 24.12.2013, 07:36
Re: Please wait before using this command* - by BiGR0ckeR - 24.12.2013, 09:10
Re: Please wait before using this command* - by Konstantinos - 24.12.2013, 10:12

Forum Jump:


Users browsing this thread: 3 Guest(s)