#1

i want to do that the admins will be able to see the commands and everything the players writing (including /pm and all that...) how can i do it? (i already defined admins and levels and all that...)
thx!
b.t.w: sorry for my bad english!
Reply
#2

You should add your last line to your signature, I see it everytime I read a post of yours
Anyway, run a loop through all players, check if he is an admin, if so - send him the message which the giveplayer id recives.
Reply
#3

give me an exemple i didnt understand
Reply
#4

anyone!?!?!?!??!
Reply
#5

I dont know for strcmp or dcmd but if you use ZCMD you can do it with OnPlayerCommandPerformed in this way:
pawn Код:
public OnPlayerCommandPerformed(playerid, cmdtext[], success)
{
    if(!success) return SendClientMessage(playerid, COLOR_HERE,"Unknown command! use /help if you forgot the commands");
    else
    {
        new str[75];
        new pName[MAX_PLAYER_NAME];
        GetPlayerName(playerid, pName, sizeof(pName));
        format(str, sizeof(str),"CMD: %s [%i] Command: \"%s\"",pName, playerid, cmdtext[0]);
        printf(str);
        SendRconMessage(COLOR_HERE, str);
    }
    return 1;
}
And for SendRconMessage (For the loop I would recommend foreach, but this will work to) You can use this:
pawn Код:
forward SendRconMessage(color, string[]);
public SendRconMessage(color, string[])
{
        for(new i = 0; i < MAX_PLAYERS; i++)
        {
                if(IsPlayerConnected(i))
                {
                        if(IsPlayerAdmin(i))
                        {
                            SendClientMessage(i, color, string);
                        }
                }
        }
}
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)