SendFactionMessage - 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)
+--- Thread: SendFactionMessage (
/showthread.php?tid=597314)
SendFactionMessage -
TwinkiDaBoss - 29.12.2015
Its quite a small problem, but the chat is shown to everyone
PHP код:
SendFactionMessage(playerid,string[]) {
foreach(new i : Player) {
if(AccInfo[playerid][PlayerFaction] == AccInfo[i][PlayerFaction]) {
Msg(i, COLOR_LIGHTBLUE, string);
}
}
return true;
}
Re: SendFactionMessage -
Ritzy2K - 29.12.2015
Change playerid with 'i'.
Edit: Patrick beat me to it.
Re: SendFactionMessage -
DRIFT_HUNTER - 29.12.2015
That function is completely ok. You probably using it inside OnPlayerText
When you send that message return 0 so that message that player typed is not sent (you are sending it with Msg function)