23.01.2010, 15:54
When i am typing #hello it just says in main chat: FuTuRe(0): #hello instead of [Team Chat]FuTuRe(0): hello
pawn Код:
public OnPlayerText(playerid, text[])
{
new string[128], tmpname[MAX_PLAYER_NAME];
if(text[0] == '#')
{
GetPlayerName(playerid, tmpname, sizeof(tmpname));
if(gTeam[playerid] == TEAM_MEDIC)format(string, sizeof(string), "[Team Chat]%s(%d): %s", tmpname,playerid, text[1]); // Specify which gTeams you need this for.
if(gTeam[playerid] == TEAM_COP)format(string, sizeof(string), "[Team Chat]%s(%d): %s", tmpname,playerid, text[1]); // Specify which gTeams you need this for. for(new i = 0; i < MAX_PLAYERS; i++)
{
for(new i=0;i<MAX_PLAYERS;i++)
{
if(IsPlayerConnected(i) && GetPlayerTeam(i) == GetPlayerTeam(playerid)) SendClientMessage(i, oranje, string);
return 0;
}
}
return 0;
}
return 0;
}