SA-MP Forums Archive
Little help - 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: Little help (/showthread.php?tid=522493)



Little help - arlindi - 27.06.2014

Hello can to help mee with SendClientMessageToAll.

Hello i want to create to send meesage to all players but not on myself.


Re: Little help - Eth - 27.06.2014

SendClientMessageToAll(color,message);
example:
SendClientMessageToAll(-1,"Hi everyone!");


Re: Little help - Konstantinos - 27.06.2014

pawn Код:
SendMessageToAll(-1, "some tests", 1);
Everyone will receive the message except ID 1.

pawn Код:
SendMessageToAll(color, const string[], exception = INVALID_PLAYER_ID)
{
    if (exception != INVALID_PLAYER_ID)
    {
        foreach(new i : Player)
        {
            if (i != exception) SendClientMessage(i, color, string);
        }
    }
    else
    {
        foreach(new i : Player) SendClientMessage(i, color, string);
    }
}



Re: Little help - arlindi - 27.06.2014

And message come allso and on mee.