23.01.2010, 17:16
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
And this is the code from the GM self.
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;
}
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;
}