Raised This Month: $ Target: $400
 0% 

help VIPmenu


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
hannes
Member
Join Date: Sep 2010
Old 09-20-2012 , 08:22   help VIPmenu
Reply With Quote #1

PHP Code:
#include <amxmodx> 
#include <amxmisc> 
#include <fun> 
#include <cstrike> 
#include <chatcolor> 
#include <engine> 
#include <hamsandwich> 

#define ACCESS ADMIN_ADMIN 

new cStatuscHealth
new const 
Version[] = "0.5"
new const 
PLUGIN_PREFIX[] = "[Admin Menu]"

new 
menu_mainmenu_vipmenu_adminmenu_master

new 
player_choice[33]; 
new 
choice_to_wep[3][] = { 
    
"weapon_deagle""weapon_p228""weapon_fiveseven" 


public 
plugin_init() 

    
register_plugin"AdminMenu" Version "R34Lx" ); 
     
    
cHealth        register_cvar("menu_health""15"); 
    
cStatus        register_cvar("menu_status""1"); 

    
register_clcmd"say menu","VipMenu"); 
    
register_clcmd"say_team menu","VipMenu"); 
    
register_clcmd"say !menu","VipMenu"); 
    
register_clcmd"say_team !menu","VipMenu"); 
    
register_clcmd"say /menu","VipMenu"); 
    
register_clcmd"say_team /menu","VipMenu"); 
     
    
RegisterHamHam_Spawn"player""FwdHamPlayerSpawn"); 
     
    
build_menus(); 


public 
FwdHamPlayerSpawn(id
    if(
is_user_alive(id)  
    && 
get_pcvar_num(cStatus)  
    && 
get_user_flags(id) & ACCESS
        
set_user_health(idget_user_health(id) + get_pcvar_num(cHealth)) 
         
public 
VipMenu(id
    if(
get_pcvar_num(cStatus)) 
    
menu_display(idmenu_main0); 

build_menus() 

    
menu_main menu_create("\r[Main Menu] \yBy \rR34LX \y& \rRandom1""menu_handler"); 
    
menu_additem(menu_main"\rAdmin \wMenu""1"ADMIN_MENU); 
    
menu_additem(menu_main"\rMaster \wMenu""2"ADMIN_ADMIN); 
    
menu_additem(menu_main"\rVIP \wMenu""3"ADMIN_CHAT); 
    
menu_addblank(menu_main0); 
    
menu_additem(menu_main"\rBuy Admin""4"); 
    
menu_setprop(menu_mainMPROP_EXITMEXIT_ALL); 
     
    
menu_admin menu_create("\r[Admin Menu] \wYou can only select 1 each map!^n\yBy \rR34LX \y& \rRandom1""menu_handler"
    
menu_additem(menu_admin"\rDeagle \w1 Bullet""1"0); 
    
menu_additem(menu_admin"\rCompact \w1 Bullet""2"0); 
    
menu_additem(menu_admin"\rFiveSeven \w1 Bullet""3"0); 
    
menu_setprop(menu_adminMPROP_EXITMEXIT_ALL); 
     
    
menu_master menu_create("\r[Master Menu] \wYou can only select 1 each map!^n\yBy \rR34LX \y& \rRandom1""menu_handler"
    
menu_additem(menu_master"\rCompact \w1 Bullet""1"0); 
    
menu_setprop(menu_masterMPROP_EXITMEXIT_ALL); 
     
    
menu_vip menu_create("\r[VIP Menu] \wYou can only select 1 each map!^n\yBy \rR34LX \y& \rRandom1""menu_handler"
    
menu_additem(menu_vip"\rFiveSeven \w1 Bullet""1"0); 
    
menu_setprop(menu_vipMPROP_EXITMEXIT_ALL); 


public 
client_connect(id
    
player_choice[id] = -1

public 
plugin_end() 

    
menu_destroy(menu_main); 
    
menu_destroy(menu_admin); 
    
menu_destroy(menu_master); 
    
menu_destroy(menu_vip); 


public 
menu_handler(idmenuitem

    if( 
item == MENU_EXIT 
        return 
PLUGIN_HANDLED

    new 
data[6], szName[64]; 
    new 
accesscallback
    
menu_item_getinfo(menuitemaccessdata,charsmax(data), szName,charsmax(szName), callback); 

    new 
key str_to_num(data); 
     
    if ( 
menu == menu_main 
    { 
        if ( 
key == show_motd(id,"buyadmin.txt","Prices of admin.");  
        else if ( 
player_choice[id] == -menu_display(idkey == menu_admin key == menu_master key == menu_vip menu_main0); 
        else  
        { 
            
client_print_color(idGrey"^4%s ^3You already selected a gun for the duration of the map"PLUGIN_PREFIX); 
            return 
PLUGIN_HANDLED
        } 
    } 
    else if ( 
menu == menu_admin 
    { 
        
player_choice[id] = key 1
        switch(
key
        { 
            case 
1client_print_color(idGrey"^4%s ^3You selected ^4Deagle ^3whit 1 ^4Bullet"PLUGIN_PREFIX); 
            case 
2client_print_color(idGrey"^4%s ^3You selected ^4Compact ^3whit 1 ^4Bullet"PLUGIN_PREFIX); 
            case 
3client_print_color(idGrey"^4%s ^3You selected ^4FiveSeven ^3whit 1 ^4Bullet"PLUGIN_PREFIX); 
        } 
    } 
    else if ( 
menu == menu_master 
    { 
        switch(
key
        { 
            case 
1:  
            { 
                
client_print_color(idGrey"^4%s ^3You selected ^4Compact ^3whit 1 ^4Bullet"PLUGIN_PREFIX); 
                
player_choice[id] = 1
            } 
        } 
    } 
    else if ( 
menu == menu_vip 
    { 
        switch(
key
        { 
            case 
1:  
            { 
                
client_print_color(idGrey"^4%s ^3You selected ^4FiveSeven ^3whit 1 ^4Bullet"PLUGIN_PREFIX); 
                
player_choice[id] = 2
            } 
        } 
    } 
    
hand_out_weapon(id); 
    return 
PLUGIN_HANDLED


hand_out_weapon(id

    if ( -
>= player_choice[id] || player_choice[id] > ) return; 
    else { 
        
give_item(id,choice_to_wep[player_choice[id]]); 
        
cs_set_weapon_ammo(find_ent_by_owner(-1choice_to_wep[player_choice[id]], id), 1); 
    } 

__________________

Last edited by hannes; 09-21-2012 at 07:18.
hannes is offline
quilhos
Veteran Member
Join Date: Jun 2010
Old 09-21-2012 , 19:43   Re: help VIPmenu
Reply With Quote #2

What you want? This plugin dont work? How add a function? Give some detail --'
__________________
ELO RATING SYSTEM - SQL [COMPLETE]
Quote:
Originally Posted by Liverwiz View Post
DDDRRRRAAAAMMMMAAAAA!!!???

Put this shit on pause while i go get some popcorn!!
quilhos is offline
Reply



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 08:19.


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