SendClientMessageToAllEx - 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)
+---- Forum: Help Archive (
https://sampforum.blast.hk/forumdisplay.php?fid=89)
+---- Thread: SendClientMessageToAllEx (
/showthread.php?tid=247216)
SendClientMessageToAllEx -
nuriel8833 - 08.04.2011
I copied this stock from the usefull stocks thread:
PHP код:
stock SendClientMessageToAllEx( color, string[], exeptionid )
{
if ( !strlen( string ) ) return 0;
for ( new i = 0, j = GetMaxPlayers(); i < j; i ++ )
{
if ( !IsPlayerConnected( i ) || ( i == exeptionid ) ) continue;
SendClientMessage( i, color, string );
}
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
Re: SendClientMessageToAllEx -
[DJ]Boki - 08.04.2011
If it's warning,it will work
AW: SendClientMessageToAllEx -
xerox8521 - 08.04.2011
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"
Re: AW: SendClientMessageToAllEx -
nuriel8833 - 08.04.2011
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!