SA-MP Forums Archive
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 
Player) {
        if(
AccInfo[playerid][PlayerFaction] == AccInfo[i][PlayerFaction]) {
            
Msg(iCOLOR_LIGHTBLUEstring);
        }
    }
    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)