Send message to admins when a player uses a CMD
#2

Need a little more info, what do you mean by "admins"? RCON Admins? Or do you have like a login/register system with admin levels assigned to users? If you are just using RCON Admins, then I would do the following,
pawn Код:
stock SendClientMessageToAdmins(color, message[128])
{
    for(new i = 0; i < MAX_PLAYERS; i++){
        if(IsPlayerAdmin(i)){
            SendClientMessage(i, color, message);
        }
    }
}
And whereever you are doing your command... this example is using ZCMD
pawn Код:
CMD:mycommand(playerid, params[])
{
    //whatever the command does

    //send message to admins
    SendClientMessageToAdmins(-1, "A user used a command, blah blah...");
    return 1;
}
Haven't tested it out, should work though.
Reply


Messages In This Thread

Forum Jump:


Users browsing this thread: 2 Guest(s)