Team Chat Help
#3

Quote:
Originally Posted by SpiderWalk
Посмотреть сообщение
I have problem but i dont know how to fix it.

Problem is in this:When i type "!Hi" all 2 teams see that message not just 1 team but all teams see that message and i dont know how to fix that!

pawn Код:
//CODE
its because you send the message to everyone

pawn Код:
//
    if( (text[0] == '!') && (text[1] != 0) ) {
        new
            i,
            string[256],
            team = GetPlayerTeam(playerid)
        ;
        GetPlayerName( playerid, string, MAX_PLAYER_NAME );
        format( string, sizeof string, "[Team-Chat] %s: %s", string, text[1] );
        for( ; i != MAX_PLAYERS; ++i ) {
            if( GetPlayerTeam(i) == team ) {
                SendClientMessage( i, yellow, string );
            }
        }
        return 0;
    }
Reply


Messages In This Thread
Team Chat Help - by SpiderWalk - 19.02.2012, 15:53
Re: Team Chat Help - by emokidx - 19.02.2012, 15:56
AW: Team Chat Help - by Nero_3D - 19.02.2012, 16:01

Forum Jump:


Users browsing this thread: 1 Guest(s)