Teams in chat?
#1

Solved
Reply
#2

pawn Код:
public OnPlayerText(playerid, text[]) {

    new pName[MAX_PLAYER_NAME];
    new string[256];
    GetPlayerName(playerid, pName, sizeof(pName));
    foreach(Player, i)
    {
        if(gTeam[playerid] == gTeam[i])
        {
            format(string, sizeof(string),"[TEAM][ID:%d]:%s", playerid, text);
            SendPlayerMessageToAll(playerid, string);
        }
    }

   return 0;
}
Include foreach.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)