Team Radio?
#1

How do i make a radio so only a certain team can see what other people say,
I dont want the whole code, Just the main bit, Like what makes it so only a certain team can see that message
Reply
#2

Try this
pawn Код:
public OnPlayerText(playerid,text[])
{
    if(text[0] == '!') //change ! to what variable u wanna use
    {
      new string[128];  GetPlayerName(playerid, string, sizeof(string));
      format(string, sizeof(string), "[*Team Chat] %s: %s", string, text[1]);
        printf("%s", string);

      for(new i = 0; i < MAX_PLAYERS; i++)
        {
            if(IsPlayerConnected(i) && gTeam[i] == gTeam[playerid]) SendClientMessage(i, GetPlayerColor(playerid), string);
        }
        return 0;
    }

    return 1;
}
Reply
#3

Cant you just use gTeam with SendClientMessage?

Haha! The guy above posted at the same time.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)