Raised This Month: $ Target: $400
 0% 

[REQ] Add a menu to a menu :)


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
erader
Senior Member
Join Date: Dec 2010
Old 12-12-2011 , 09:40   [REQ] Add a menu to a menu :)
Reply With Quote #1

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

#define PLUGIN "deathrun menu"   
#define VERSION "1.0"   
#define AUTHOR "r0ck"   

new g_menu;  
new 
g_maxplayers;

public 
plugin_init()    
{   
    
register_plugin(PLUGINVERSIONAUTHOR)   
    
    
RegisterHam(Ham_Spawn"player""player_spawn"1)   
    
    
g_menu menu_create("\yDeathrun menu:""sub_menu")   
    
menu_additem(g_menu"500 Health" );   
    
menu_additem(g_menu"Invisibility" );   
    
menu_additem(g_menu"Glock" );   
    
menu_additem(g_menu"30 Flashbangs" );  
    
menu_additem(g_menu"Victim" );  
    
    
g_maxplayers get_maxplayers();
}   

public 
player_spawn(id)   
{   
    if( 
is_user_aliveid ) && cs_get_user_teamid ) == CS_TEAM_T 
    {
        
menu_displayidg_menu );  
        
set_task45.0"HideMenu"id );
    }
}   

public 
HideMenuid show_menuid0"^n");


public 
sub_menu(idmenuitem)   
{   
    switch(
item)  
    {  
        case 
0set_user_healthid500 ); 
        case 
1set_user_rendering(idkRenderFxGlowShell000kRenderTransAlpha15);   
        case 
2:   
        {   
            
give_item(id"weapon_glock18"); 
            
cs_set_user_bpammo(idCSW_GLOCK1860);
        }   
        
        case 
3:  
        {  
            
give_item(id"weapon_flashbang");  
            
cs_set_user_bpammo(idCSW_FLASHBANG30);  
        }
        case 
4:
        {
            
set_user_healthid5000 );
            
            for ( new 
1<= g_maxplayersi++ )
            {
                if ( 
is_user_alive) && cs_get_user_team) == CS_TEAM_CT )
                {
                    
give_itemi"weapon_awp" )
                    
cs_set_user_bpammoiCSW_AWP30 )
                }
            }
            
        }
    }
    
    return 
PLUGIN_HANDLED;   

i want a edit: when tero choose victim, ct will have on every spawn that round a menu where he can choose 3 weapoms: M4A1 , AK47 and AWP.
__________________
If you live for something, you're not alone my friend...
erader is offline
Reply


Thread Tools
Display Modes

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 20:49.


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