Raised This Month: $ Target: $400
 0% 

custom menu


  
 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
Author Message
Maurice
Senior Member
Join Date: Nov 2006
Location: Netherlands
Old 12-17-2007 , 08:16   custom menu
Reply With Quote #1

Hello, i wanted to make a custom menu for admin on my server so they only see where they have the acces for but i have 2 things i cant get work and ask therefore for some help here.

The thing i have already is this

Code:
#include <amxmodx> 
#include <cstrike> 

#define Keysadmin_menu (1<<0)|(1<<1)|(1<<9)

public plugin_init() { 
    register_plugin("Admin Menu","1.0","sharpe") 

    register_clcmd( "adminmenu","Showadmin_menu", ADMIN_LEVEL_A, "Open menu") 

    register_menucmd(register_menuid("admin_menu"), Keysadmin_menu, "Pressedadmin_menu") 
} 

public Showadmin_menu(id) { 
    show_menu(id, Keysadmin_menu, "\yAdmin Menu^n^n\w1. action1^n2. action2^n3. action3^n^n0. Exit^n", -1, "admin_menu")
} 

public Pressedadmin_menu(id, key) { 

    switch (key) { 
        case 0: client_cmd(id,"amx_banmenu") 
        case 1: client_cmd(id,"amx_recordmenu")      
    } 
    return PLUGIN_HANDLED 
}
The 2 problems i have is that every player can open the menu even if they dont have the admin_level_a acces and in the console i getthe message unknown command: adminmenu althought the menu is just working. Have anyone an idea how to fix both problems?
__________________
Luck? Luck is only one feeling of amazement concerning a seemingly incidental circumstance which one himself must create.
Maurice is offline
 



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


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


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