SA-MP Forums Archive
SendClientMessageToAll not working proprely - 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: SendClientMessageToAll not working proprely (/showthread.php?tid=580361)



SendClientMessageToAll not working proprely - Amads - 04.07.2015

I have no idea what's going on.

I've downloaded the 0.3.7 server, updated includes, and suddenly SendClientMessageToAll isn't working properly. (Actually, all kinds of 'all players loops' doesn't work).

No matter what GM i'm testing - SendClientMessageToAll sends the message ONLY to player ID 0. Players with ID 1,2,3... don't recieve the message.

Could somebody help me?


Re: SendClientMessageToAll not working proprely - Wan - 04.07.2015

Could You post an example?


Re: SendClientMessageToAll not working proprely - Vanter - 04.07.2015

give codes


Re: SendClientMessageToAll not working proprely - kyriakos587 - 04.07.2015

you can do this if you want...

for(new i = 0;i<MAX_PLAYERS;i++)
{
if(IsPlayerConnected(i))
{
SendClientMessage(i,....);
}
}


Re: SendClientMessageToAll not working proprely - liquor - 05.07.2015

Re-download the server package and replace your inlcudes, especially a_samp.inc.


Re: SendClientMessageToAll not working proprely - SaintMikey - 05.07.2015

Код:
SCMALL(COLOR_ADGREEN, msg);
SCMALL is defined as SendClientMessageToAll in my script, just try it like this and it could work. if you have the message defined as msg though.


Re: SendClientMessageToAll not working proprely - Amads - 05.07.2015

Код:
public OnPlayerConnect(playerid)
{
   SendClientMessageToAll(COLOR_WHITE, "Hello!");
   return 1;
}
Here's an example

Re-downloaded the server package and replaced inlcudes - still nothing.
Oh, "for(new i = 0;i<MAX_PLAYERS;i++)" also doesn't work.

This is the weirdest problem i've ever had with pawn.

//oops, sorry - "for(new i = 0;i<MAX_PLAYERS;i++)" also shows the message to ID 0 only.


Re: SendClientMessageToAll not working proprely - Yashas - 05.07.2015

Quote:
Originally Posted by SaintMikey
Посмотреть сообщение
Код:
SCMALL(COLOR_ADGREEN, msg);
SCMALL is defined as SendClientMessageToAll in my script, just try it like this and it could work. if you have the message defined as msg though.
-.- It makes no difference!! Ultimately the compiler will substitute SendClientMessageToAll in place of SCMALL.

Have you hooked SendClientMessageToAll? or do any of the includes you use do it?

What operating system are you using? 0.3.7 works in 8.1


Re: SendClientMessageToAll not working proprely - Amads - 05.07.2015

Uhh, it doesn't work on Windows 7?
I didn't touch SendClientMessageToAll (or ANY loop), and I don't use any includes other than a_samp.