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



SendClientMessageToOthers - AnonScripter - 22.01.2014

can somebody tell me why is this not working ?

pawn Код:
forward SendClientMessageToOthers(playerid, color, msg[]);
public SendClientMessageToOthers(playerid, color, msg[])
{
    for(new i=0; i<MAX_PLAYERS; i++)
    {
        if(IsPlayerConnected(i) && i != playerid)
        {
            SendClientMessage(i,color,msg);
        }
    }
}



Re: SendClientMessageToOthers - Riddick94 - 22.01.2014

Message is not being sent to the player that have called the function.


Re: SendClientMessageToOthers - PT - 22.01.2014

why you no only use.

SendClientMessageToAll

?


Re: SendClientMessageToOthers - Hansrutger - 22.01.2014

Quote:
Originally Posted by PT
Посмотреть сообщение
why you no only use.

SendClientMessageToAll

?
It's supposed to be that everyone except only one in the server should get the message.

Код:
for(new i=0; i<MAX_PLAYERS; i++)
into
Код:
for(new i=0; i <= MAX_PLAYERS; i++) //you want the last player to receive the message as well I hope. ^^
This will probably not solve your actual problem though, but worth mentioning. :P