SA-MP Forums Archive
Something about ahelp command - 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: Something about ahelp command (/showthread.php?tid=662062)



Something about ahelp command - Deken - 22.12.2018

Is there a way to make if is player admin 7 to show him only commands for admin 7 not for admin 6 5 4 3 2 1 because i put all commands into admin 7 list so its pointless to see 1,2,3,4,5,6 commands same for 6 for 5 for 4 for 3 for 2


Re: Something about ahelp command - DarkBr - 22.12.2018

Here is a very simplified example

If the player is level "7" only one text will be shown, if "5" another type of text will be shown

PHP код:
CMD:admincmds(playeridparams[])
{
    new 
padmin /*playerAdmin;*/
    
new cmds[12];
    
    switch(
padmin)
    {
           case 
1//..
           
case 2//..
           
case 3//..
           
case 4//..
           
case 5cmds "/trgtg [wep]"
           
case 6//..
           
case 7cmds "/blabla [id]" //
           
default: return 0;
    }
    return 
SendClientMessage(playerid, -1cmds);

Tailor your code and optimize.