SA-MP Forums Archive
[Tutorial] [TUT] [MESSAGEING] SendTargetMessage - 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: Tutorials (https://sampforum.blast.hk/forumdisplay.php?fid=70)
+---- Thread: [Tutorial] [TUT] [MESSAGEING] SendTargetMessage (/showthread.php?tid=134930)



[TUT] [MESSAGEING] SendTargetMessage - Micko9 - 18.03.2010

Hey anoyher of my tutorials
SendTargetMessage will send a message witch will exept a id example : i use in /ban :
i want that it doesnt send the message : "%s Got Banned..." to the player that got banned but he must still be connected . well il use SendTargetMessage(bannedidhere,red,string);
then the exeptionid ( in this case bannedidhere ) will not recive the message .
[WARRNING : this isnt for beginners but for alitle more advanced scripters ]
ok. this is the code ( i dont have much time sry...)
pawn Code:
stock SendTargetMessage(exeptionid,color,const msg[])
{
    for (new i=0; i<MAX_PLAYERS; i++)
    {
      if (IsPlayerConnected(i) && i != exeptionid) SendClientMessage(i,color,msg);
    }
}