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



Tag de chat OnPlayerText - Matheus0811 - 17.06.2014

Salve galera sou math aqui. Entгo to aqui trazendo tag de chat vou dar um exemplo alguйm falando no serve (Um adm lvl 5) "Math_Math" [ID:0] [DONO] Diz: HUSASHAUHS" (um Vip) "Math_Math" [ID:0] [VIP] Diz:HUSAUSHAUS" (um jogador normal) "Math_Math" [ID:0] [JOGADOR] Diz:HUSAHSUASH" entгo vamos lah

PHP Code:
    SetPlayerChatBubble(playeridtextVermelho50.010000);
       if(
dini_Int(file,"Admin") == 1)
    {
        new 
stringv[128];
        new 
pname[MAX_PLAYER_NAME];
        
GetPlayerName(playerid,pname,sizeof(pname));
        
format(stringvsizeof(stringv), "%s [ID: %d] {00FF00}[{FF0000}MOD{00FF00}]{00FFFF} %s",pname,playerid,text);
        
SendClientMessageToAll(GetPlayerColor(playerid),stringv);
        return 
0;
    }
           if(
dini_Int(file,"Admin") == 2)
    {
        new 
stringv[128];
        new 
pname[MAX_PLAYER_NAME];
        
GetPlayerName(playerid,pname,sizeof(pname));
        
format(stringvsizeof(stringv), "%s [ID: %d] {00FF00}[{FF0000}SUPERMOD{00FF00}]{00FFFF} %s",pname,playerid,text);
        
SendClientMessageToAll(GetPlayerColor(playerid),stringv);
        return 
0;
    }
           if(
dini_Int(file,"Admin") == 3)
    {
        new 
stringv[128];
        new 
pname[MAX_PLAYER_NAME];
        
GetPlayerName(playerid,pname,sizeof(pname));
        
format(stringvsizeof(stringv), "%s [ID: %d] {00FF00}[{FF0000}ADM{00FF00}]{00FFFF} %s",pname,playerid,text);
        
SendClientMessageToAll(GetPlayerColor(playerid),stringv);
        return 
0;
    }
           if(
dini_Int(file,"Admin") == 4)
    {
        new 
stringv[128];
        new 
pname[MAX_PLAYER_NAME];
        
GetPlayerName(playerid,pname,sizeof(pname));
        
format(stringvsizeof(stringv), "%s [ID: %d] {00FF00}[{FF0000}SUBDONO{00FF00}]{00FFFF} %s",pname,playerid,text);
        
SendClientMessageToAll(GetPlayerColor(playerid),stringv);
        return 
0;
    }
           if(
dini_Int(file,"Admin") == 5)
    {
        new 
stringv[128];
        new 
pname[MAX_PLAYER_NAME];
        
GetPlayerName(playerid,pname,sizeof(pname));
        
format(stringvsizeof(stringv), "%s [ID: %d] {00FF00}[{FF0000}DONO{00FF00}]{00FFFF} %s",pname,playerid,text);
        
SendClientMessageToAll(GetPlayerColor(playerid),stringv);
        return 
0;
    }
    
    if(
dini_Int(file,"VIP") == 1)
    {
        new 
stringv[128];
        new 
pname[MAX_PLAYER_NAME];
        
GetPlayerName(playerid,pname,sizeof(pname));
        
format(stringvsizeof(stringv), "%s [ID: %d] {00FF00}[{FF0000}VIP{00FF00}]{00FFFF} %s",pname,playerid,text);
        
SendClientMessageToAll(GetPlayerColor(playerid),stringv);
        return 
0;
    }
    if(
Chatlb == 1)
    {
        
format(stringsizeof(string), "[ID: %d] {00FF00}[{FF0000}JOGADOR{00FF00}]{00FFFF} %s"playeridtext);
        
SendPlayerMessageToAll(playeridstring);
    }
    else
    {
        
ChatProximo(playeridtext);
    }
    return 
0;