Gangchat Problem
#1

pawn Код:
//=========================[TeamChat]===========================================
public OnPlayerText(playerid,text[]){

  if(PlayerData[playerid][Muted] == 1)
  {
    SendClientMessage(playerid, COLOR_RED, "Unable to talk. (REASON: Muted)");
    return 0;
  }
    if(text[0] == '!')  {
      new name[24], string[256];
      GetPlayerName(playerid, name, 24);
      format(string, sizeof(string), "*Teamchat %s: %s", name, text[1]);
        printf("%s", string);
        TeamChatLog(string);
      for(new i = 0; i < MAX_PLAYERS; i++)  {
            if(IsPlayerConnected(i))    {
                if(gTeam[i] == gTeam[playerid])     SendClientMessage(i, GetPlayerColor(playerid), string);
            }
        }
        return 1;
    }

    return 1;
}
When I submit a message it is visible in public chat too.
Reply


Messages In This Thread
Gangchat Problem - by Studio - 11.12.2009, 09:38
Re: Gangchat Problem - by [GTA] - 11.12.2009, 09:40
Re: Gangchat Problem - by Studio - 11.12.2009, 09:41
Re: Gangchat Problem - by Studio - 11.12.2009, 10:56
Re: Gangchat Problem - by Abernethy - 11.12.2009, 11:09
Re: Gangchat Problem - by Zeex - 11.12.2009, 12:43

Forum Jump:


Users browsing this thread: 1 Guest(s)