team chat
#1

public OnPlayerText(playerid, text[])
{
if(PlayerIsMuted[playerid] == 1)
{
SendClientMessage(playerid, COLOR_BRIGHTRED, "You are muted and cannot talk.");
return false;
}

if(text[0] == '@')
{
new string[256], pName[24];
if(PlayerInfo[playerid][AdminLevel] < 1)
{
GetPlayerName(playerid,pName,sizeof(pName));
format(string, sizeof(string), "Admin Chat - %s: %s", pName, text[1]);
SendModMsg(COLOR_YELLOW, string);
}
return 0;
}
if(text[0] == '!')
{
new string[128];
GetPlayerName(playerid, string, sizeof(string));
format(string, sizeof(string), "[Team] %s: %s", string, text[1]);
printf("%s", string);
for(new i = 0; i < MAX_PLAYERS; i++)
{
if(IsPlayerConnected(i) && gTeam[i] == gTeam[playerid]) SendClientMessage(i, GetPlayerColor(playerid), string);
}
return 0;
}
return 1;
}


Why I can see other team text?
Reply


Messages In This Thread
team chat - by shoru93 - 22.05.2010, 19:19
Re: team chat - by dice7 - 22.05.2010, 19:27
Re: team chat - by Joe_ - 22.05.2010, 19:27

Forum Jump:


Users browsing this thread: 2 Guest(s)