Raised This Month: $ Target: $400
 0% 

Add jetpack / parachute to a menu


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
erader
Senior Member
Join Date: Dec 2010
Old 12-24-2011 , 12:08   Add jetpack / parachute to a menu
Reply With Quote #1

Hi guys!

Here is the plugin:

PHP Code:
#include <amxmodx> 
#include <fun> 
#include <cstrike> 
#include <engine> 

#define PLUGIN "Vipmenu"
#define VERSION "1.0"
#define AUTHOR Zirual"

new bool:has_used[33

public 
plugin_init() 

    
register_clcmd"say /vipmenu""VIPMenu" ); 
    
register_clcmd"say_team /vipmenu""VIPMenu" ); 

    
register_logevent("event_new_round"2"1=Round_Start"


public 
VIPMenuid 

    if(!
has_used[id]) 
    { 
        if(
get_user_flags(id) & ADMIN_LEVEL_H
        { 
            new 
vip_menu menu_create"\rVip menu:""menu_handler" ); 
            
menu_additemvip_menu"\w150Hp""1"); 
            
menu_additemvip_menu"\HE,FB,SG""2"); 
            
menu_additemvip_menu"\USB""3"); 
         
            
menu_setpropvip_menuMPROP_EXITMEXIT_ALL ); 
            
menu_displayidvip_menu); 
        } 
        else 
        { 
            
client_print(idprint_chat"[VIP] You dont have acess to this menu!"
        } 
    } 
    else 
    { 
        
client_print(idprint_chat"[VIP] You already opened menu!"
    } 


public 
menu_handleridmenuitem 

    if( 
item == MENU_EXIT 
    { 
        
menu_destroymenu ); 
        return 
PLUGIN_HANDLED
    } 
    new 
data[6], iName[64]; 
    new 
accesscallback
     
    
menu_item_getinfomenuitemaccessdata,5iName63callback ); 
    new 
key str_to_numdata ); 
    switch( 
key 
    { 
        case 
1
        { 
            if( 
is_user_aliveid ) ) 
            { 
                
set_user_healthid150 ); //Sets health of id to 150 
            

        } 
        case 
2
        { 
            if( 
is_user_aliveid ) ) 
            { 
        
give_item(id,"weapon_hegrenade")
        
give_item(id"weapon_flashbang");
        
give_item(id"weapon_flashbang");
        
give_item(id"weapon_smokegrenade");
            } 
        } 
        case 
3
        { 
            if(
is_user_alive(id)) 
            { 
        
give_item(id,"weapon_usb")
        
give_item(id,"ammo_50ae")
        
give_item(id,"ammo_50ae")
        
give_item(id,"ammo_50ae")
        
give_item(id,"ammo_50ae")
        
give_item(id,"ammo_50ae")
        
give_item(id,"ammo_50ae")
        
give_item(id,"ammo_50ae")
            }     
        }    
   
    }   
     
    
has_used[id] = true
    
menu_destroymenu ); 
    return 
PLUGIN_HANDLED

 

public 
event_new_round() 
    
arrayset(has_usedfalse33
/* AMXX-Studio Notes - DO NOT MODIFY BELOW HERE
*{\\ rtf1\\ ansi\\ ansicpg1257\\ deff0\\ deflang1061{\\ fonttbl{\\ f0\\ fnil Tahoma;}}\n\\ viewkind4\\ uc1\\ pard\\ f0\\ fs16 \n\\ par }
*/ 
If you can, add 2 new items to this menu:
4.Jetpack that can be used just 5 seconds
5.Parachute

Or just one of those.

Thanks.
__________________
If you live for something, you're not alone my friend...

Last edited by erader; 12-24-2011 at 12:08.
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:51.


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