Problem with Gang Chat
#5

pawn Код:
new te[256];
  format(te, sizeof(te),"(id:%d): %s", playerid, text);
  SendPlayerMessageToAll(playerid, te);
return 0;
That code you have send message to all players anyway, doesn't matter whether they are gang members or not.

Try this:
pawn Код:
public OnPlayerText(playerid, text[])
{  
  new message[128];
 
  if (text[0] == '!' && playerGang[playerid] > 0)
  {
     new playername[MAX_PLAYER_NAME];
     GetPlayerName(playerid, playername, MAX_PLAYER_NAME);

     strdel(text, 0, 1);
     format(message, sizeof(message),"Gang Chat: %s: %s", playername, text);
     
     for(new i = 0; i < gangInfo[playerGang[playerid]][1]; i++)
     {
        SendClientMessage(gangMembers[playerGang[playerid]], ROZOWY, message);
     }
  }
  else
  {
     format(message, sizeof(message)," (id:%d): %s", playerid, text);
     SendPlayerMessageToAll(playerid, message);
  }
  return 0;
}
Also you need read this topic.
Reply


Messages In This Thread
Problem with Gang Chat - by dawidek11 - 21.02.2009, 08:01
Re: Problem with Gang Chat - by _diana_ - 30.08.2009, 03:09
Re: Problem with Gang Chat - by HuRRiCaNe - 30.08.2009, 03:18
Re: Problem with Gang Chat - by _diana_ - 30.08.2009, 05:36
Re: Problem with Gang Chat - by Zeex - 30.08.2009, 06:00
Re: Problem with Gang Chat - by Imran.Abbas - 30.08.2009, 06:41
Re: Problem with Gang Chat - by _diana_ - 31.08.2009, 09:19
Re: Problem with Gang Chat - by dice7 - 31.08.2009, 09:44
Re: Problem with Gang Chat - by _diana_ - 31.08.2009, 09:57

Forum Jump:


Users browsing this thread: 1 Guest(s)