SA-MP Forums Archive
chat - Printable Version

+- SA-MP Forums Archive (https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (https://sampforum.blast.hk/forumdisplay.php?fid=12)
+---- Forum: Help Archive (https://sampforum.blast.hk/forumdisplay.php?fid=89)
+---- Thread: chat (/showthread.php?tid=86083)



chat - _ReloadeD_ - 11.07.2009

i try to do a clan chat but it's doesn't work when i do @ MASSAGE all in my clan see it but all the server see it to why>??
this my command:
Код:
public OnPlayerText(playerid, text[]) {
 new Clan[100], name[24], str[256],pname[24],PClan[45];
  GetPlayerName(playerid,name,24);
  format(Clan, sizeof(Clan), "RIAN/Clans/%s.txt", name);
  if(text[0] == '@') {
  new ClanChat[256];
  new senderName[MAX_PLAYER_NAME];
  strmid(ClanChat,text,1,strlen(text));
  GetPlayerName(playerid, senderName, sizeof(senderName));
  format(str, sizeof(str),"[Clan] - %s (%d): %s", senderName, playerid, ClanChat);
  for(new i; i<200; i++)
  {
  if(IsPlayerConnected(i))
  {
  GetPlayerName(i,pname,24);
  format(PClan, sizeof(PClan), "RIAN/Clans/%s.txt", pname);
  if(!strcmp(dini_Get(Clan,"Clan Name"),dini_Get(PClan,"Clan Name"),true)) SendClientMessage(i,COLOR_RED,str);
  }
  }
  return 0;
  }
 return 1;
}



Re: chat - Mr_Finnigan - 11.07.2009

I could use a nice massage.


Re: chat - _ReloadeD_ - 13.07.2009

someone?