team chat! ^
#2

why you don't use gTeam or something. it's easy than this.

but Try this code
pawn Код:
new string[128];
    if(text[0] == '^')
    {
    format(string,sizeof(string),"[TEAM CHAT] %s[id: %d]: %s",GetName(playerid),playerid,text[1]);
    if( Policee[playerid] == 1)
    {
            for(new i = 0; i<MAX_PLAYERS; i++)
            {
            if(IsPlayerConnected(i) && Policee[i] == 1) SendClientMessage(i,GetPlayerColor(playerid),string);
            }
            return 0;
    }
    if(Yakoza [playerid] == 1)
    {
            for(new i = 0; i<MAX_PLAYERS; i++)
            {
            if(IsPlayerConnected(i) && Yakoza [i] == 1) SendClientMessage(i,GetPlayerColor(playerid),string);
            }
            return 0;
    }
    if( Drifterss [playerid] == 1)
    {
            for(new i = 0; i<MAX_PLAYERS; i++)
            {
            if(IsPlayerConnected(i) && Drifterss [i] == 1) SendClientMessage(i,GetPlayerColor(playerid),string);
            }
            return 0;
    }
    if( CasinoM [playerid] == 1)
    {
            for(new i = 0; i<MAX_PLAYERS; i++)
            {
            if(IsPlayerConnected(i) && CasinoM [i] == 1) SendClientMessage(i,GetPlayerColor(playerid),string);
            }
            return 0;
    }
    if( HomeLesss[playerid] == 1)
    {
            for(new i = 0; i<MAX_PLAYERS; i++)
            {
            if(IsPlayerConnected(i) && HomeLesss[i] == 1) SendClientMessage(i,GetPlayerColor(playerid),string);
            }
            return 0;
    }
    if( TheGaragee [playerid] == 1)
    {
            for(new i = 0; i<MAX_PLAYERS; i++)
            {
            if(IsPlayerConnected(i) && TheGaragee [i] == 1) SendClientMessage(i,GetPlayerColor(playerid),string);
            }
            return 0;
    }
    }
    return 1;
Reply


Messages In This Thread
team chat! ^ - by karni357 - 08.02.2013, 12:40
Re: team chat! ^ - by Jewell - 08.02.2013, 13:44

Forum Jump:


Users browsing this thread: 1 Guest(s)