A Question !
#1

Hello Guy!!
- I have a question to to ask about player have to wait xx second to continue use that command
Example :
CMD:test(playerid, params[])
{
SendClienMessage(playerid, -1,"abcxyz");
return 1;
}
if player use that command, player have to wait 10 ~~ 15 second to use that command again!
Reply
#2

At the top

Код:
new CommandWait[MAX_PLAYERS];
Код:
CMD:test(playerid, params[])
{
    if(CommandWait[playerid] > gettime())return SendClientMessage(playerid, -1,"Wait before using this command again!");
    {
        SendClientMessage(playerid, -1,"abcxyz");
        CommandWait[playerid] = gettime()+60; //1 Minute
	}
    return 1;
}
Reply
#3

Quote:
Originally Posted by Scripter18
Посмотреть сообщение
At the top

Код:
new CommandWait[MAX_PLAYERS];
Код:
CMD:test(playerid, params[])
{
    if(CommandWait[playerid] > gettime())return SendClientMessage(playerid, -1,"Wait before using this command again!");
    {
        SendClientMessage(playerid, -1,"abcxyz");
        CommandWait[playerid] = gettime()+60; //1 Minute
	}
    return 1;
}
thank you
Reply
#4

Do you want the timer for every command or just a single command?
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)