Criando chat no modo torcidas/facзгo [Ex: ! Olб]
#6

pawn Код:
public OnPlayerText(playerid, text[]) {
      new String[250], Nome[24]; // Variбveis ficaram avulsas caso a condiзгo a baixo returnar false.
      GetPlayerName(playerid, Nome, 24); //
      if(text[0] == '!') {
           format(String, sizeof(String), "[Chat Torcida %d]: %s (%d): %s", PlayerInfo[playerid][pTorcidas], Nome, playerid, text[1]);
           for(new i; i < MAX_PLAYERS; i++) {
                if(PlayerInfo[playerid][pTorcidas] == PlayerInfo[i][pTorcidas]) {
                    SendClientMessage(i, -1, String);
                }
           }
      }
      return 1;
}
Reply


Messages In This Thread

Forum Jump:


Users browsing this thread: 1 Guest(s)