SA-MP Forums Archive
[Ajuda] Bloqueador de comandos. - Printable Version

+- SA-MP Forums Archive (https://sampforum.blast.hk)
+-- Forum: Non-English (https://sampforum.blast.hk/forumdisplay.php?fid=9)
+--- Forum: Languages (https://sampforum.blast.hk/forumdisplay.php?fid=33)
+---- Forum: Português/Portuguese (https://sampforum.blast.hk/forumdisplay.php?fid=34)
+---- Thread: [Ajuda] Bloqueador de comandos. (/showthread.php?tid=606269)



Bloqueador de comandos. - iFaLLeN - 02.05.2016

Olá, boa noite queria como bota um tempo nos comandos,
Exemplo

O Player coloca /plantarbomba , ai ele pode usar o comando de novo depois d 30 segundos


Re: Bloqueador de comandos. - F1N4L - 02.05.2016

Um modo bem otimizado seria com gettime
Код:
new CmdTemp[MAX_PLAYERS]; // global

comando teste
{
	if(CmdTemp[playerid] > gettime()) return SendClientMessage(playerid, -1, "Aguarde alguns segundos.");
	
	CmdTemp[playerid] = 30 + gettime();
}



Re: Bloqueador de comandos. - iFaLLeN - 02.05.2016

Valeu irmão <3