SendClientMessageToAllEx
#1

I copied this stock from the usefull stocks thread:
PHP код:
stock SendClientMessageToAllExcolorstring[], exeptionid )
{
  if ( !
strlen( string ) ) return 0;
  for ( new 
0GetMaxPlayers(); j++ )
  {
    if ( !
IsPlayerConnected) || ( == exeptionid ) ) continue;
    
SendClientMessageicolorstring );
  }
  return 
1;

But I haven't understood the last part of the script,what does expetionid means?
What do I need to put instead of it? Cause everytime I use this stock I get "number of arguments does not match definition" warning
Reply
#2

If it's warning,it will work
Reply
#3

pawn Код:
if ( !IsPlayerConnected( i ) || ( i == exeptionid ) ) continue;
    SendClientMessage( i, color, string );
means if the i is not connected OR i is the exeptionid then the message will be send

pawn Код:
SendClientMessageToAllEx(0xFF0000AA,"This message cant read id 1",1);
so every player exept id 1 will get the message "This message cant read id 1"
Reply
#4

Quote:
Originally Posted by xerox8521
Посмотреть сообщение
pawn Код:
if ( !IsPlayerConnected( i ) || ( i == exeptionid ) ) continue;
    SendClientMessage( i, color, string );
means if the i is not connected OR i is the exeptionid then the message will be send

pawn Код:
SendClientMessageToAllEx(0xFF0000AA,"This message cant read id 1",1);
so every player exept id 1 will get the message "This message cant read id 1"
Cool
Thank you very much for your help!
Reply


Forum Jump:


Users browsing this thread: 5 Guest(s)