SA-MP Forums Archive
A Question ! - Printable Version

+- SA-MP Forums Archive (https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (https://sampforum.blast.hk/forumdisplay.php?fid=12)
+--- Thread: A Question ! (/showthread.php?tid=623710)



A Question ! - TYDS - 04.12.2016

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!


Re: A Question ! - Bolex_ - 04.12.2016

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



Re: A Question ! - TYDS - 04.12.2016

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


Re: A Question ! - StrikerZ - 04.12.2016

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