Question And Error..
#3

I have These But Would they be causing problems

pawn Код:
public OnPlayerText(playerid, text[])
{
   for(new i = 0; i <MAX_PLAYERS; i++)
   {
      if(AdminOn == 0)
      {
           new pName[MAX_PLAYER_NAME],str[128];
           GetPlayerName(playerid,pName,sizeof(pName));
           format(str,sizeof(str),"%s(%i):{FFFFFF} %s",pName,playerid,text);
           SendClientMessageToAll(RED,str);
           ChatSystem = 0;
           return 0;
      }
      else if(PlayerInfo[playerid][pMechTeam] == 5)
      {
           new pName[MAX_PLAYER_NAME],str[128];
           GetPlayerName(playerid,pName,sizeof(pName));
           format(str,sizeof(str),"%s(%i):{FFFFFF} %s",pName,playerid,text);
           SendClientMessageToAll(BROWN,str);
           ChatSystem = 0;
           return 0;
       }
      else if(PlayerInfo[playerid][pMedicTeam] == 4)
      {
           new pName[MAX_PLAYER_NAME],str[128];
           GetPlayerName(playerid,pName,sizeof(pName));
           format(str,sizeof(str),"%s(%i):{FFFFFF} %s",pName,playerid,text);
           SendClientMessageToAll(PINK,str);
           ChatSystem = 0;
           return 0;
       }
      else if(PlayerInfo[playerid][pPoliceTeam] == 3)
      {
           new pName[MAX_PLAYER_NAME],str[128];
           GetPlayerName(playerid,pName,sizeof(pName));
           format(str,sizeof(str),"%s(%i):{FFFFFF} %s",pName,playerid,text);
           SendClientMessageToAll(LIGHTBLUE,str);
           ChatSystem = 0;
           return 0;
       }
       else if(PlayerInfo[playerid][pFireTeam] == 2)
       {
           new pName[MAX_PLAYER_NAME],str[128];
           GetPlayerName(playerid,pName,sizeof(pName));
           format(str,sizeof(str),"%s(%i):{FFFFFF} %s",pName,playerid,text);
           SendClientMessageToAll(LIGHTRED,str);
           ChatSystem = 0;
           return 0;
       }
   }
   if(ChatSystem == 1)
   {
       new pName[MAX_PLAYER_NAME],str[128];
       GetPlayerName(playerid,pName,sizeof(pName));
       format(str,sizeof(str),"%s(%i): %s",pName,playerid,text);
       SendClientMessageToAll(WHITE,str);
       return 0;
   }
   return 1;
}
Reply


Messages In This Thread
Question And Error.. - by Buzzbomb - 24.02.2012, 04:42
Re: Question And Error.. - by KreeDz - 24.02.2012, 07:00
Re: Question And Error.. - by Buzzbomb - 27.02.2012, 01:59
Re: Question And Error.. - by Buzzbomb - 29.02.2012, 20:04
Re: Question And Error.. - by Mike_Peterson - 29.02.2012, 20:05
Re: Question And Error.. - by Buzzbomb - 29.02.2012, 23:29

Forum Jump:


Users browsing this thread: 2 Guest(s)