Admin Commands - 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: Admin Commands (
/showthread.php?tid=478838)
Admin Commands -
finelaq - 01.12.2013
Hi, I need some such thing, that if some admin command writes all the Admins will see that he used to command.
EG: I write /god. others see:
pawn Код:
Admin finelaq used the command: /god
Thanks!
used: http://translate.******.com/
Re: Admin Commands -
SilentSoul - 01.12.2013
Create a stock with your admin loop through all players to check if the player is an admin or not , if he is an admin > 0 SendClientMessage to him , and on your /god command add sendadminmessage (the created stock about admin checking) for example my admin enum is PlayerInfo[playerid][pAdminLevel] so my stock should look like that
pawn Код:
stock SendMessageToAdmins(text[])
{
for(new i = 0; i < MAX_PLAYERS; i++)
{
if(PlayerInfo[i][pAdminLevel] > 0)
{
SendClientMessage(i, -1, text);
}
}
}
And on your command just add however you typed in the stock i choosed SendMessageToAdmins example.
pawn Код:
CMD:god(playerid , params[])
{
new text[126];
format(text,sizeof(text),"Admin %s has used command /god",playerid);
SendMessageToAdmins(text);
return 1;
}
P.s: Sorry for editing , i would like to give you example on /god.