27.02.2012, 01:59
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;
}