12.12.2012, 11:09
One alternative to this is:
Otherwise you can add it individually to all commands.
Like:
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;
}
Like:
pawn Код:
public OnPlayerCommandText(playerid, cmdtext[])
{
if(strcmp(cmdtext, "/testcommand", true) == 0) //Or ZCMD, DCMD, whatever...
{
SendCommandToAdmins(playerid, "testcommand");
return 1;
}
return 0;
}