Problem with teamchat!
#1

'Sup y'all?

Well, I've created a small teamchat, but I just noticed that it doesn't do what I want, lol! For example, if I'm requesting the teamchat to appear with the sign '!', it shows the message just for the team, that's right! But, everything is written in yellow, and I don't want this! I want the team displayed which is chatting with his own color, the player with his team-color and the output-text in white, just like in a normal chat! For example, if I'm in the Grove Street team now:

[Grove] PLAYERNAME: %s (text)

"[Grove]" would be in the team-color, the playername also in his team-color, and the output-text in white! This is what I currently got:

pawn Код:
new string[256];
        new playername[MAX_PLAYER_NAME];
        if(text[0] == '!' && text[1] != 0)
        {
            GetPlayerName(playerid,playername,MAX_PLAYER_NAME);
            format(string,128,"[Team-Chat] %s: %s", playername,text[1] );
            for(new i = 0; i < MAX_PLAYERS; i++)
            {
                if(IsPlayerConnected(i) && gTeam[playerid] == gTeam[i])
                    SendClientMessage(i,COLOR_YELLOW,string);
            }
            return 0;
     }
Reply


Messages In This Thread
Problem with teamchat! - by Twisted_Insane - 31.03.2012, 13:10
Re: Problem with teamchat! - by vyper - 31.03.2012, 14:18
Re: Problem with teamchat! - by sjvt - 31.03.2012, 14:31
Re: Problem with teamchat! - by Twisted_Insane - 31.03.2012, 14:59
Re: Problem with teamchat! - by Randyy - 31.03.2012, 15:02
Re: Problem with teamchat! - by Twisted_Insane - 31.03.2012, 15:08
Re: Problem with teamchat! - by Randyy - 31.03.2012, 15:14
AW: Problem with teamchat! - by Nero_3D - 31.03.2012, 15:16
Re: Problem with teamchat! - by Randyy - 31.03.2012, 15:19
Re: Problem with teamchat! - by Twisted_Insane - 31.03.2012, 15:25

Forum Jump:


Users browsing this thread: 1 Guest(s)