AlliedModders

AlliedModders (https://forums.alliedmods.net/index.php)
-   Scripting Help (https://forums.alliedmods.net/forumdisplay.php?f=11)
-   -   Only person with a flag can use it (https://forums.alliedmods.net/showthread.php?t=172097)

Exusar 11-15-2011 10:53

Only person with a flag can use it
 
1 Attachment(s)
Hey. I want only people with flag ADMIN_LEVEL_C can use command say /m and say /misje. I know I can add flag in register_clcmd, but I want to show people without this flag a text (e.g. Only VIPs can use it). I tried to add some code in public menu_misje, but the compilation failed. Please help.

Erox902 11-15-2011 11:07

Re: Only person with a flag can use it
 
PHP Code:

public menu_misje(id)
{
    if( 
access(idADMIN_LEVEL_C) )
    {
        if(!
ma_misje[id])
        {
            new 
menu menu_create("Menu misji""misje_handler");
            
menu_additem(menu"Zabij klase");
            
menu_additem(menu"Zapoluj na gracza");
            
menu_additem(menu"Zabij jako pierwszy \r[3000 EXP]");
            
menu_additem(menu"Zabij headshootem");
            
menu_additem(menu"Podloz pake");
            
menu_additem(menu"Rozbroj pake");
            
            
menu_setprop(menuMPROP_EXITNAME"Wyjscie");
            
menu_setprop(menuMPROP_NEXTNAME"Nastepna strona");
            
menu_setprop(menuMPROP_BACKNAME"Poprzednia strona");
            
menu_display(idmenu);
        }
        else
        {
            
menu_ma_misje(id)
        }
    }
    else
    {
        
client_print(idprint_chat"Only VIPs can use this")
    }


Ps. This was a request, didn't really belong in scripting help.

Exusar 11-15-2011 11:19

Re: Only person with a flag can use it
 
Thank you.

Right, Im sorry.


All times are GMT -4. The time now is 08:26.

Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.