Need help in sending all the cmds to owner
#1

What should i put in the script so when ever a player types a cmd either its correct one or wrong one server will send admin level 7 a message like this " Cmd: Playername has typed "/pm marven hi hru? " something like this.
Reply
#2

pawn Код:
public OnPlayerCommandReceived(playerid, cmdtext[])
{
    new cmd1[256], stringo[128], tmp[256], idx, pName[MAX_PLAYERS_NAME];
    GetPlayerName(playerid, pName, sizeof(pName));
    cmd1 = strtok(cmdtext, idx);
     format(stringo, sizeof(stringo), "|- [CMD] %s [id:%d] typed: %s -| ", pName ,playerid,cmdtext);
        for(new i = 0; i < MAX_PLAYERS; i++) {
            if(IsPlayerConnected(i)) {
                if(IsPlayerAdmin(i)) {
                    SendClientMessage(i, COLOR_GREY, stringo);
                }
            }
        }
I Think it should work.. didn't test it.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)