Jump to content
  • 0

Problema text inaintea numelui (tasta T)


Question

Posted

Am incercat ca, in momentul trimiterii unui mesaj pe chat (tasta T), daca esti admin sau helper, sa apara inaintea numelui (A), respectiv (H).
Nu am erori, cred ca omit ceva important..

 onplayertext =>

if(realchat) {
        if(IsPlayerLogged[playerid] == 0) return 0;    
        if(TutorialActive[playerid] == 1) return 0;    
        if(InGame[playerid] == 1) {
            new name[36];
            if(Team[playerid] == 1) name = "{FFA1A1}(Terrorist){FFFFFF}";
            else name ="{75AFFF}(Counter-Terrorist){FFFFFF}";
            format(string, sizeof(string), "{DE974B}[%s] %s %s: {FFFFFF}%s", ArenaRank(playerid), name, GetNameEx(playerid), text);
            SendGameTeam(Team[playerid], -1, string);        
        }
        if(PlayerInfo[playerid][pHelper] >= 1) 
            format(string, sizeof(string), "{cc3300}(H){FFFFFF}%s: %s", GetNameEx(playerid), text);
        if(PlayerInfo[playerid][pAdmin] >= 1)
            format(string, sizeof(string), "{ff0000}(A){FFFFFF}%s: %s", GetNameEx(playerid), text);
 

Ares4  =(

 

 

2 answers to this question

Recommended Posts

  • 0
Posted
On 8/22/2023 at 10:55 PM, Kiran said:

Am incercat ca, in momentul trimiterii unui mesaj pe chat (tasta T), daca esti admin sau helper, sa apara inaintea numelui (A), respectiv (H).
Nu am erori, cred ca omit ceva important..

 onplayertext =>

if(realchat) {
        if(IsPlayerLogged[playerid] == 0) return 0;    
        if(TutorialActive[playerid] == 1) return 0;    
        if(InGame[playerid] == 1) {
            new name[36];
            if(Team[playerid] == 1) name = "{FFA1A1}(Terrorist){FFFFFF}";
            else name ="{75AFFF}(Counter-Terrorist){FFFFFF}";
            format(string, sizeof(string), "{DE974B}[%s] %s %s: {FFFFFF}%s", ArenaRank(playerid), name, GetNameEx(playerid), text);
            SendGameTeam(Team[playerid], -1, string);        
        }
        if(PlayerInfo[playerid][pHelper] >= 1) 
            format(string, sizeof(string), "{cc3300}(H){FFFFFF}%s: %s", GetNameEx(playerid), text);
        if(PlayerInfo[playerid][pAdmin] >= 1)
            format(string, sizeof(string), "{ff0000}(A){FFFFFF}%s: %s", GetNameEx(playerid), text);
 

sub astea:        if(PlayerInfo[playerid][pHelper] >= 1) 
            format(string, sizeof(string), "{cc3300}(H){FFFFFF}%s: %s", GetNameEx(playerid), text);
        if(PlayerInfo[playerid][pAdmin] >= 1)
            format(string, sizeof(string), "{ff0000}(A){FFFFFF}%s: %s", GetNameEx(playerid), text);

pune 

SendClinetMessage(i, COLOR_WHITE, string);

i sau cum ai tu la foreach / for

asgood.ro

 

 

 

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue. For more details you can also review our Terms of Use and Privacy Policy.