[Ajuda] OnPlayerText '.'
#1

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;

Reply
#2

coloca return 0 no chat vip.
Reply
#3

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.
Reply
#4

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

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 =)
Reply
#6

Obrigado ai manolos =)
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)