Restrict a command for admins - 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: Restrict a command for admins (
/showthread.php?tid=331812)
Restrict a command for admins -
Fadel - 06.04.2012
Iam new to scripting and if I want to restrict a cmd for admins only on an RP server. Can you show me a tut?
Re: Restrict a command for admins -
Kitten - 06.04.2012
pawn Код:
if(strcmp(cmdtext, "/test", true) == 0)
{
if(IsPlayerAdmin(playerid))
{
SendClientMessage(playerid,-1,"Hi, admin");
}
else
{
SendClientMessage(playerid,-1,"You're not an admin");
return 0;
}
return 1;
}
Re: Restrict a command for admins -
Fadel - 06.04.2012
So I rePlace the "/test" with the cmd I want?
Re: Restrict a command for admins -
Kitten - 06.04.2012
@Fadel yes
Re: Restrict a command for admins -
Fadel - 06.04.2012
Thanks.. I will test it soon. Rep+