SA-MP Forums Archive
[Ajuda] Alguem Sabe? - 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] Alguem Sabe? (/showthread.php?tid=605419)



Alguem Sabe? - capron - 19.04.2016

Alguйm sabe como faзo pra bloquear todos os comandos no zcmd..

Exemplo:

PHP код:
if(tanoevento[playerid] == 1) return SendClientMessage(playeridred"Nгo й possнvel usar nenhum comando enquanto estiver no evento."); 
Grato desde jб!



Re: Alguem Sabe? - 99fe3rnando - 19.04.2016

PHP код:
public OnPlayerCommandReceived(playeridcmdtext[])
{
    if(
tanoevento[playerid] == 1) return SendClientMessage(playerid, -1"Nгo й possнvel usar nenhum comando enquanto estiver no evento."),0;
    return 
1;




Re: Alguem Sabe? - capron - 19.04.2016

Obrigado Cara, precisava disso! Vlw


Re: Alguem Sabe? - Stroon - 19.04.2016

Aproveitando a deixa:
PHP код:
public OnPlayerCommandReceived(playeridcmdtext[])
{
    if(
arena[playerid] == 1) return SendClientMessage(playerid, -1"Nгo й possнvel usar nenhum comando enquanto estiver no evento."), 0;
    return 
true;
    if(
Flood[playerid] > GetTickCount())
    return 
SendClientMessage(playerid, -1"Aguarde 5 segundos usar comandos novamente!"), 0;

    
Flood[playerid] = GetTickCount() + 5000;

    return 
true;

Код:
(1476) : warning 225: unreachable code
Linha (1476): if(Flood[playerid] > GetTickCount())
Poderia ajudar?


Re: Alguem Sabe? - F1N4L - 19.04.2016

Quote:
Originally Posted by Stroon
Посмотреть сообщение
Aproveitando a deixa:
PHP код:
public OnPlayerCommandReceived(playeridcmdtext[])
{
    if(
arena[playerid] == 1) return SendClientMessage(playerid, -1"Nгo й possнvel usar nenhum comando enquanto estiver no evento."), 0;
    return 
true;
    if(
Flood[playerid] > GetTickCount())
    return 
SendClientMessage(playerid, -1"Aguarde 5 segundos usar comandos novamente!"), 0;
    
Flood[playerid] = GetTickCount() + 5000;
    return 
true;

Код:
(1476) : warning 225: unreachable code
Linha (1476): if(Flood[playerid] > GetTickCount())
Poderia ajudar?
Vocк estб retornando suas vezes:
PHP код:
public OnPlayerCommandReceived(playeridcmdtext[])
{
    if(
arena[playerid] == 1) return SendClientMessage(playerid, -1"Nгo й possнvel usar nenhum comando enquanto estiver no evento."), 0;
    if(
Flood[playerid] > GetTickCount())
    return 
SendClientMessage(playerid, -1"Aguarde 5 segundos usar comandos novamente!"), 0;
    
Flood[playerid] = GetTickCount() + 5000;
    return 
true;




Re: Alguem Sabe? - Stroon - 19.04.2016

Vlw final. rep add.