[UNSOLVED]team chat isn't working
#6

Still not working but i've found the problem. When i unload my admin FS the team chat is working. When it's loaded it's not working


This is the code from my Admin / Account FS
pawn Код:
public OnPlayerText(playerid, text[])
{
    if (pmuted[playerid]== 1 ) return 0;
        new string[256];
        {
        if(text[0] == '@')
        {
          if(pInfo[playerid][level] > 0)
          {
                format(string, sizeof(string), "[Admin Chat] %s(%i): %s", pInfo[playerid][name], playerid, text[1]);

              for(new j = 0; j < MAX_PLAYERS; j++)
                {
                    if(IsPlayerConnected(j) && pInfo[j][level] > 0) SendClientMessage(j, ADMIN, string);
                }
            }
            else SendClientMessage(playerid,oranje,"You aren't admin!");
            return 0;
        }
      new textstring[256];
        format(textstring, sizeof(textstring), "%s(%i): %s", pInfo[playerid][name],playerid, text);
        SendClientMessageToAll(GetPlayerColor(playerid),textstring);
        }
        return 0;
}
And this is the code from the GM self.
pawn Код:
public OnPlayerText(playerid, text[])
{
if(text[0] == '#')
{
if(gTeam[playerid] == TEAM_MEDIC || gTeam[playerid] == TEAM_COP)
{
  new string[128], tmpname[MAX_PLAYER_NAME];
GetPlayerName(playerid, tmpname, sizeof(tmpname));
format(string, sizeof(string), "[Team Chat]%s(%d): %s", tmpname,playerid, text[1]);

for(new i=0;i<MAX_PLAYERS;i++)
{
if(IsPlayerConnected(i) && GetPlayerTeam(i) == GetPlayerTeam(playerid))
{
SendClientMessage(i, oranje, string);
}
return 0;
}
}
return 0;
}
return 1;
}
Reply


Messages In This Thread
[UNSOLVED]team chat isn't working - by `FuTuRe- - 23.01.2010, 15:54
Re: team chat isn't working - by `FuTuRe- - 23.01.2010, 16:38
Re: [UNSOLVED]team chat isn't working - by DeathOnaStick - 23.01.2010, 16:42
Re: [UNSOLVED]team chat isn't working - by dice7 - 23.01.2010, 16:46
Re: [UNSOLVED]team chat isn't working - by bajskorv123 - 23.01.2010, 17:12
Re: [UNSOLVED]team chat isn't working - by `FuTuRe- - 23.01.2010, 17:16
Re: [UNSOLVED]team chat isn't working - by [dN]Eagle - 23.01.2010, 18:23

Forum Jump:


Users browsing this thread: 2 Guest(s)