Sendmessagetoadmins
#2

One alternative to this is:
pawn Код:
public OnPlayerCommandText(playerid, cmdtext[])
{
    if(PInfo[playerid][Level] > 1)
    {
        SendCommandToAdmins(playerid, cmdtext);
    }
    return 0;
}

stock SendCommandToAdmins(playerid, command[])
{
    new string[], PLAYERSNAME[MAX_PLAYER_NAME];
    GetPlayerName(playerid, PLAYERSNAME, MAX_PLAYER_NAME);
    format(string,sizeof(string),"Admin %s Has Used The Command: %s",PLAYERSNAME,command);
    SendMessageToAdmins(string);
    return 1;
}
Otherwise you can add it individually to all commands.
Like:
pawn Код:
public OnPlayerCommandText(playerid, cmdtext[])
{
    if(strcmp(cmdtext, "/testcommand", true) == 0) //Or ZCMD, DCMD, whatever...
    {
        SendCommandToAdmins(playerid, "testcommand");
        return 1;
    }
    return 0;
}
Reply


Messages In This Thread
Sendmessagetoadmins - by Biess - 12.12.2012, 10:05
Re: Sendmessagetoadmins - by Threshold - 12.12.2012, 11:09
Re: Sendmessagetoadmins - by David (Sabljak) - 12.12.2012, 11:24
Re: Sendmessagetoadmins - by Threshold - 12.12.2012, 11:26
Re: Sendmessagetoadmins - by Biess - 12.12.2012, 12:14
Re: Sendmessagetoadmins - by Threshold - 12.12.2012, 12:23

Forum Jump:


Users browsing this thread: 2 Guest(s)