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



OnPlayerText '.' - Maklister - 23.10.2012

Bom dia manolos,

Nгo sei o que da dando errado mais quando sou Vip e coloco ". Teste" apare 3 chats, o normal, o proprio do samp, e o vip, era pra aparecer so o VIP pra quem e VIP

code

PHP код:
public OnPlayerText(playeridtext[])
{
    for(new 
0MAX_PLAYERSi++)
    {
        if(
text[0] == '.')
        {
            new 
t[128];
            if(
PlayerInfo[playerid][pVip] == 1)
            {
                if(
PlayerInfo[i][pVip] == 1)
                {
                    
format(Stringsizeof(String), "™ [ VIP ] %s %s"nome(playerid), t);
                    
SendClientMessage(i0xFF80C0AAString);
                    return 
1;
                }
            }
        }
    }
    return 
0;




Re: OnPlayerText '.' - DrTHE - 23.10.2012

coloca return 0 no chat vip.


Re: OnPlayerText '.' - Sergiinhonike - 23.10.2012

Bom dia mano, Acho que tem que ser assim:

return SendClientMessage(i, 0xFF80C0AA, String);

Tenta aн..

@EDIT

Ou coloca como co cara aн de cima falou.


Re: OnPlayerText '.' - Don_Speed - 23.10.2012

Como o DrTHE disse voce precisa colocar o return 0 no chat para que nao ocorra flood!


Re: OnPlayerText '.' - [BOPE]Seu._.Madruga - 23.10.2012

Eai manin Murilin vo postar aqui vai

PHP код:
public OnPlayerText(playeridtext[]) 

    if(
text[0] == '.')
    {
        if(
PlayerInfo[playerid][pVip] == 1
        {
            new 
tmp[148];
            new 
string[148];
            new 
aname[MAX_PLAYER_NAME];
            
GetPlayerName(playerid,aname,sizeof(aname));
            
strmid(tmptext1strlen(text));
            if(!
strlen(tmp))
            {
                
SendClientMessage(playerid, -1"[ ERRO ] {FF0000}use: . [ Mensagem ]");
                return 
0;
            }
            else
            {
                for(new 
0MAX_PLAYERSi++)
                { 
                    if(
PlayerInfo[i][pVip] == 1
                    { 
                        
format(stringsizeof(string), "™ [ VIP ] %s %s"anametmp); 
                        
SendClientMessage(i0xFF80C0AAstring); 
                        return 
0
                    } 
                } 
            } 
        } 
    }
    return 
0

Tб ae manin =)


Re: OnPlayerText '.' - Maklister - 23.10.2012

Obrigado ai manolos =)