12.07.2009, 18:54
This works great,that is not the problem.
If Cops(green) types ;hello the chat windows says [TEAM][TLC]Bob:hello
What i want is for the team chat to be in maroon regardless of what team sends it so it would be:
[TEAM][TLC]Bob:hello
Here is the code:
If Cops(green) types ;hello the chat windows says [TEAM][TLC]Bob:hello
What i want is for the team chat to be in maroon regardless of what team sends it so it would be:
[TEAM][TLC]Bob:hello
Here is the code:
Код:
public OnPlayerText(playerid, text[])
{
if(text[0] == ';')
{
new string[256],name[24];
GetPlayerName(playerid,name,24);
format(string,256,"[TEAM] %s: %s",name,text[1]);
for(new i = 0; i < MAX_PLAYERS; i++)
{
if(IsPlayerConnected(i))
{
if(gGroup[i] == gGroup[playerid])
SendClientMessage(i, GetPlayerColor(playerid), string);
}
}
return 0;
}
return 1;
}

