Help with sending all the attempted cmds to admin. - 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)
+--- Thread: Help with sending all the attempted cmds to admin. (
/showthread.php?tid=477571)
Help with sending all the attempted cmds to admin. -
Marven - 24.11.2013
Hey there, what should i add in my script so every time a player types a cmd either its a right one or a wrong one it should send the message to owner like " Playername used Commandname" e.g Marven used /me tries to jump over the fench.
Re: Help with sending all the attempted cmds to admin. -
David (Sabljak) - 24.11.2013
Try this but im not 100% sure
Код:
public OnPlayerCommandReceived(playerid, cmdtext[])
{
new string[128],playername[MAX_PLAYER_NAME];
GetPlayerName(playerid,playername,sizeof(playername));
format(string, sizeof string, "Player %s Typed %s", playername,cmdtext);
SendHead(-1,string);//your stock for sendadminmessage like
return 1;
}
stock SendHead(color, string[])
{
foreach (Player, i)
{
if(PlayerInfo[i][pAdmin?] == ?)//your admin and level here
{
SCM(i, color, string);
}
}
}