SendClientMessageToAll not working proprely
#1

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?
Reply
#2

Could You post an example?
Reply
#3

give codes
Reply
#4

you can do this if you want...

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

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

Код:
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.
Reply
#7

Код:
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.
Reply
#8

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
Reply
#9

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.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)