Team chat [FINALLY WORKED] THANK YOU!
#1

I have no idea if this will work, I found it at forum, my I think it will only send a message on the players chat. not to THE ALL TEAM :S

pawn Код:
if(strcmp(cmd,"/pr",true)==0)
    {
        if (gTeam[playerid] == TEAM_COPS)
            {
                if ((strlen(cmdtext) >= 1)&&(strlen(cmdtext) <= 3))
                    {
                        GetPlayerName(playerid,name,sizeof(name));
                        format(string,sizeof(string),"Police Radio(%s):%s",name,cmdtext[128]);
                        SendCopMessage(0xFFFFFF, string);
                    }
                   
                    else return SendClientMessage(playerid, 0xFFFF00AA, "-> You mean: /pr [Message]");
                    }
                   
                    else return SendClientMessage(playerid, 0xFFFF00AA, "-> You are not a Police Officer");
                    }
pawn Код:
SendCopMessage(color, text[]) {
  for(new i = 0; i < MAX_PLAYERS; i ++) {
  if(IsPlayerConnected(i)) {
  if (gTeam[i] == TEAM_COPS) {
      SendClientMessage(i, color, text);
      }
    }
  }
}
Reply


Messages In This Thread
Team chat [FINALLY WORKED] THANK YOU! - by Hot - 22.05.2009, 20:35
Re: Team chat ' - by Rks25 - 22.05.2009, 20:36
Re: Team chat ' - by Hot - 22.05.2009, 20:42
Re: Team chat ' - by Rks25 - 22.05.2009, 20:47
Re: Team chat ' - by Hot - 23.05.2009, 13:04
Re: Team chat ' - by Weirdosport - 23.05.2009, 13:23
Re: Team chat ' - by Hot - 23.05.2009, 13:27
Re: Team chat ' STILL NEEDING HELPPPPPPPPPPPPPPPPPPPP - by Hot - 23.05.2009, 13:51
Re: Team chat ' STILL NEEDING HELPPPPPPPPPPPPPPPPPPPP - by Badger(new) - 23.05.2009, 14:12
Re: Team chat ' STILL NEEDING HELPPPPPPPPPPPPPPPPPPPP - by Weirdosport - 23.05.2009, 14:24

Forum Jump:


Users browsing this thread: 1 Guest(s)