SA-MP Forums Archive
Cmd help - Printable Version

+- SA-MP Forums Archive (https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (https://sampforum.blast.hk/forumdisplay.php?fid=12)
+---- Forum: Help Archive (https://sampforum.blast.hk/forumdisplay.php?fid=89)
+---- Thread: Cmd help (/showthread.php?tid=247825)



Cmd help - boyan96 - 10.04.2011

How I can make if a player write a command the admins to can see it


Re: Cmd help - CyNiC - 11.04.2011

Put in the init of the callback OnPlayerCommandText:
pawn Код:
new str[64], name[MAX_PLAYER_NAME];
GetPlayerName(playerid, name, sizeof name);
format(str, 64, "%s has sent the command: \"%s\".", name, cmdtext);
for(new i = 0, j = GetMaxPlayers(); i < j; i++)
{
    if(IsPlayerAdmin(i))
    {      
        SendClientMessage(i, 0xFFFFFFAA, str);
    }
}