13.08.2009, 19:55
Hey, I have this team chat but when I try to use it it just sends the message to the player who sent it and to id 0 but no one else? Any thoughts on whats wrong? heres the code:
Код:
public OnPlayerText(playerid, text[]) { new PlayerName[MAX_PLAYER_NAME]; GetPlayerName(playerid, PlayerName, sizeof(PlayerName)); if(text[0] == ';') { new string[256]; format(string, sizeof(string), "[Team] %s(ID:%d):%s", PlayerName, playerid, text); for(new i = 0; i <= MAX_PLAYERS; i++ ) { if(gTeam[i] == gTeam[playerid]) { SendClientMessage(i, TEAMCHATCOLOR, string); } } return 0; } return 1; }