PDA

View Full Version : SendClientMessageToAll not working proprely


Amads
04/07/2015, 06:41 PM
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? :confused:

Wan
04/07/2015, 10:34 PM
Could You post an example?

Vanter
04/07/2015, 10:39 PM
give codes

kyriakos587
04/07/2015, 11:44 PM
you can do this if you want...

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

liquor
05/07/2015, 01:57 AM
Re-download the server package and replace your inlcudes, especially a_samp.inc.

SaintMikey
05/07/2015, 02:23 AM
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.

Amads
05/07/2015, 08:18 AM
public OnPlayerConnect(playerid)
{
SendClientMessageToAll(COLOR_WHITE, "Hello!");
return 1;
}
Here's an example ;D

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. :confused:

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

Yashas
05/07/2015, 08:27 AM
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

Amads
05/07/2015, 08:32 AM
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.