Admin only message
#1

How do I make a command such as /report that only sends the message to admins?
Reply
#2

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);
Reply
#3

How would I impliment that into a command
Reply
#4

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

Yea, just use this under a command
pawn Код:
format(string, sizeof(string), "message");
Admin(color, string, 2);
to broadcast a message to administrators
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)