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



Calar Player - LucasDias - 14.06.2015

Boa tarde galera, eu calo o player normal, porйm no onplayertext nгo funciona, ele continua falando:

no onplayertext ta assim :
PHP код:
        if(PlayerInfo[playerid][pCalado] == true)
    {
        
SendClientMessage(playerid,vermelho,"| ERRO | Vocк estб mudo e nгo pode falar no chat");
        return 
0;
    } 
e o comando й esse:
PHP код:
CMD:calar(playeridparams[])
{
    new 
IDMotivo[30],Str[128];
    if( 
PlayerInfo[playerid][pAdmin] < || PlayerInfo[playerid][pMod] < 2  || PlayerInfo[playerid][pDono] < 2)
    {
        if(
sscanf(params"is"IDMotivo))return SendClientMessage(playeridvermelho"USE: /calar [ID] [MOTIVO]");
        if(!
IsPlayerConnected(ID))return SendClientMessage(playeridvermelho"| ERRO | O jogador nгo estб conectado");
        
PlayerInfo[ID][pCalado]  = true;
        
format(Strsizeof(Str), "AdmCmd: O administrador %s calou o jogador %s. Motivo: %s"Nome(playerid), Nome(ID), Motivo);
        
SendClientMessageToAll(-1Str);
    }
    else return 
SendClientMessage(playeridvermelho"| ERRO | Vocк nгo tem permissгo!");
    return 
1;




Re: Calar Player - ipsLuan - 14.06.2015

PHP код:
if(PlayerInfo[playerid][pCalado] == true) return SendClientMessage(playerid,vermelho,"| ERRO | Vocк estб mudo e nгo pode falar no chat"); 



Re: Calar Player - AzulimZW - 14.06.2015

Vocк jб colocou isso na OnPlayerText?
PHP код:
if(PlayerInfo[playerid][pCalado] == true) return SendClientMessage(playerid0xFF0000FF"Vocк estб calado");
// #Editado, obrigado pela observaзгo ipsLuan. 



Re: Calar Player - ExPLORE - 14.06.2015

faz um verificaзгo, simples assim
pawn Код:
public OnPlayerText(playerid, text[])
{
   if(PlayerInfo[playerid][pCalado] == true)
   {

     SendClientMenssage(playerid, -1, "Vocк estб calado");

   }
    return 1;
}
EDIT:Sorry, o membro acima postou primeiro!


Re: Calar Player - ipsLuan - 14.06.2015

Quote:
Originally Posted by AzulimZW
Посмотреть сообщение
Vocк jб colocou isso na OnPlayerText?
Код:
if(PlayerInfo[ID][pCalado] == true) return SendClientMessage(playerid, 0xFF0000FF, "Vocк estб calado");
Irб dб erro, pois na callback nгo existe o parвmetro 'ID'.


Re: Calar Player - LucasDias - 14.06.2015

Eu tinha escrito " onplayerspawn " porйm й " onplayertext " ta la em cima como deixei no onplayertext


Re: Calar Player - ExPLORE - 14.06.2015

manda toda a sua callback

PHP код:
OnPlayerText 



Re: Calar Player - LucasDias - 14.06.2015

Das formas que disseram acima o player ainda estб falando :X

@EDIT
Estб mandando a mensagem de calado, porйm o player ainda fala!


Re: Calar Player - ipsLuan - 14.06.2015

Manda a sua OnPlayerText completa do que jeito que estб...


Re: Calar Player - LucasDias - 14.06.2015

Quote:
Originally Posted by ipsLuan
Посмотреть сообщение
Manda a sua OnPlayerText completa do que jeito que estб...
Consegui, mas do seu jeito nгo deu certo, teve que ser com o return 0; mesmo, coloquei no inicio do onplayertext assim :
PHP код:
  if(PlayerInfo[playerid][pCalado] == true)
    {
        
SendClientMessage(playerid,Vermelho,"ERRO: Vocк estб mudo e nгo pode falar no chat");
        return 
0;
    }