26.02.2011, 22:23
Hello everyone , i Want to make a Team chat when player type @Text , the other Team members can see it.
I Made this but it didn't work , Please help me !
Thanks !
Soumi
I Made this but it didn't work , Please help me !
Код:
public OnPlayerText(playerid, text[]) { if( (text[0] == '#') && strlen(text) > 1) { new str[128]; new pName[MAX_PLAYER_NAME]; GetPlayerName(playerid, pName, MAX_PLAYER_NAME); if(GetPlayerTeam(playerid) == 1) { format(str, 128, "*Team Chat* %s Says : %s", pName, text[1]); for(new iPlayerID; iPlayerID < MAX_PLAYERS; iPlayerID++) { if(!IsPlayerConnected(iPlayerID)) continue; if(GetPlayerTeam(playerid) == 1) continue; SendClientMessage(iPlayerID, 0x33AA33AA, str); } } return 0; } return 1; }
Soumi