Team Chat Help
#1

Yes i have used Search But It didnt help btw i am not using dcmd here the code
Here is the Gang Join
Код:
new Columbians;
if (strcmp(cmd, "/choose_columbians", true) == 0)
	{
		if(Score == 50)
		{
		SendClientMessage(playerid,COLOR_GREEN,"You Have Joined The Columbians");
		SetPlayerTeam(playerid, 1);
    SendClientMessage(playerid,COLOR_GREEN,"You Name Tag's Color Will Be Yellow");
    SendClientMessage(playerid,COLOR_GREEN,"Type /c To Use Team Chat (/c [TEXT])");
    SetPlayerColor(playerid,0xFFFF80FF);
    PlayerInfo[playerid][pGang] = Columbians;
		}
		else
		{
		SendClientMessageToAll(COLOR_GREEN,"You Mush Be A JUNIOR SOLDIER To Join The Columbians");
		}
		return 1;
}
everything fine until now now is just need Team Chat using /c [Text] i am not using gTeam and the player Team is 1 Just need the message to appear for Columbians only
Reply
#2

Well, here it is in DCMD, if you don't want it in DCMD, just experiment with it.
pawn Код:
dcmd_c(playerid, params)
{
  new Text[strlen(params)];
  format(Text, sizeof(Text), "%s", params);
  if(!strlen(params)) return SendClientMessage(playerid, 0xF60000AA, "/c [Text]");
  for(new i=0; i<MAX_PLAYERS; i++)
  {
    if(PlayerInfo[playerid][pGang] == PlayerInfo[i][pGang])
    {
      new string[strlen(params) + 30];
      new Pname[24];
      GetPlayerName(playerid, Pname, 24);
      format(string, sizeof(string), "** %s: %s", Pname, Text);
      SendClientMessage(i, 0x0000F6AA, string);
    }
  }
  return 1;
}
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)