Admin only message - 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)
+--- Thread: Admin only message (
/showthread.php?tid=450399)
Admin only message -
lramos15 - 13.07.2013
How do I make a command such as /report that only sends the message to admins?
Re: Admin only message -
RALL0 - 13.07.2013
pawn Код:
stock Admin(color,string[],level)
{
foreach(Player, i)
{
if (PlayerInfo[i][pAdmin] >= level)
{
SendClientMessage(i, color, string);
}
}
return 1;
}
// For the message
format(string, sizeof(string), "message");
Admin(color, string, 2);
Re: Admin only message -
lramos15 - 13.07.2013
How would I impliment that into a command
Re: Admin only message -
Red_Dragon. - 13.07.2013
That's a stock function which is added anywhere in your script. It doesn't need to be implemented in a command. Just place it anywhere and compile.
Re: Admin only message -
RALL0 - 13.07.2013
Yea, just use this under a command
pawn Код:
format(string, sizeof(string), "message");
Admin(color, string, 2);
to broadcast a message to administrators