Raised This Month: $ Target: $400
 0% 

1st round no menu


  
 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
hornet
AMX Mod X Plugin Approver
Join Date: Mar 2010
Location: Australia
Old 10-09-2010 , 07:00   Re: 1st round no menu
Reply With Quote #9

Try this:
PHP Code:
#include <amxmodx>
#include <cstrike>
#include <fun> 
#include <hamsandwich> 
#include <colorchat>

#define AUTHOR <zirual>
#define VERSION <1.0>
#define PLUGIN <Vip menu>
 
new g_Round;

public 
plugin_init()
{
    
register_plugin("Vipmenu","1.0","Zirual");
    
RegisterHam(Ham_Spawn"player""fwHamPlayerSpawnPost"1);
    
register_event("HLTV","evRoundStart","a","1=0","2=0");
}

public 
evRoundStart()
{
    
g_Round += 1;
}

public 
fwHamPlayerSpawnPost(id
{
    
set_user_rendering(idkRenderFxNone255255255kRenderTransAlpha255);
    
    if( 
g_Round != )
    return 
PLUGIN_HANDLED;
    
    if(
get_user_flags(id) & ADMIN_LEVEL_H)
    {
        new 
menu menu_create("\gVipmenu:""menu_handler"); 
     
        
menu_additem(menu"\r +2500\w Dollars""1"0);
        
menu_additem(menu"\w Granades""2"0);
        
menu_additem(menu"\w Low Gravity""3"0);
        
menu_additem(menu"\w Tactical Shield""4"0);
        
menu_additem(menu"\w 75% Visibility""5"0);
     
        
menu_setprop(menuMPROP_EXITMEXIT_ALL
        
menu_display(idmenu0);
    }
    else
    {
        
ColorChat(idGREEN"^x03[V.I.P]^x01Wanna VIP? Say /vip")
    } 


public 
menu_handler(idmenuitem

    if( 
item == MENU_EXIT 
    { 
        
menu_destroy(menu); 
        return 
PLUGIN_HANDLED
    } 
     
    new 
data[6], iName[64]; 
    new 
acesscallback
     
    
menu_item_getinfo(menuitemacessdata,6iName63callback); 
    new 
key str_to_num(data); 
     
    switch(
key
    { 
        case 
:
        {
            
cs_set_user_money(id cs_get_user_money(id) + 25000)
        }
        case 

        {
            
give_item(id"weapon_smokegrenade")
            
give_item(id"weapon_flashbang")
            
give_item(id"weapon_flashbang")
            
give_item(id"weapon_hegrenade")
        } 
        case 

        {  
            
set_user_gravity(id0.7)
        }
        case 

        {
            
give_item(id"weapon_shield")
        }
        case 
:
        {
            
set_user_rendering(idkRenderFxNone255255255kRenderTransAlpha191);
        } 
    }

    
menu_destroy(menu); 
    return 
PLUGIN_HANDLED;

EDIT: So do you actually only want the menu to come up on the second round or the second round and every round after?
hornet 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 10:23.


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