Raised This Month: $51 Target: $400
 12% 

Simple menu with g3sg1 (free)


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
Pizzadaking
Member
Join Date: Oct 2019
Old 04-03-2020 , 10:48   Simple menu with g3sg1 (free)
Reply With Quote #1

so im trying to build a vip menu and all i have to do left is a simple menu.
Description:
Extra VIP Items
1. Riffle Sniper [ g3sg1 ]

0 Exit

player needs to have ADMIN_LEVEL_H and when they choose Riffle sniper they get G3SG1 sniper rifle for free thanks.


example below in the pic:


https://i.imgur.com/3Wyjmlb.png
Pizzadaking is offline
alferd
Veteran Member
Join Date: Dec 2019
Location: Iran is Always Eternal
Old 04-03-2020 , 11:24   Re: Simple menu with g3sg1 (free)
Reply With Quote #2

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

#define PLUGIN "Weapon_VIP"
#define VERSION "2.0"
#define AUTHOR "AlferD"

public plugin_init() {
    
register_plugin(PLUGINVERSIONAUTHOR)
    
    
register_concmd("say /vipmenu","showmenu");
}

public 
showmenu(id)
{
    new 
menu menu_create("VIP Free Weapon Menu""Pressedrod");
    
menu_additemmenu"\yRiffle Sniper \r[ \wg3sg1 \r]""0"ADMIN_LEVEL_H);
     
     
menu_setpropmenuMPROP_EXITMEXIT_ALL );   
     
     
menu_displayidmenu);  
     
     return 
PLUGIN_HANDLED;
}

public 
Pressedrod(idmenuitem)
{
     if (
item == MENU_EXIT) { 
        
menu_destroy(menu
        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(!
is_user_alive(id))
        return 
PLUGIN_HANDLED
        
    
switch(key) {
        case 
0: { 
        
strip_user_weapons (id)
        
give_item(id,"weapon_g3sg1")
        
give_item(id,"ammo_762nato")
        
give_item(id,"ammo_762nato")
        
give_item(id,"ammo_762nato")
        
give_item(id,"weapon_knife")
        }
    }
    return 
PLUGIN_CONTINUE


Last edited by alferd; 04-03-2020 at 11:33.
alferd is offline
Pizzadaking
Member
Join Date: Oct 2019
Old 04-03-2020 , 14:01   Re: Simple menu with g3sg1 (free)
Reply With Quote #3

this is what i asked for but when a vip gets the free weapon his current weapons (ex. ak47 and deagle) gets removed, can it not get removed and player have 2 weapons ?
Thanks in advance
Pizzadaking is offline
Napoleon_be
Veteran Member
Join Date: Jul 2011
Location: Belgium
Old 04-03-2020 , 14:22   Re: Simple menu with g3sg1 (free)
Reply With Quote #4

just remove these 2 lines in the code (CTRL + F to search)

PHP Code:
strip_user_weapons(id
PHP Code:
give_item(id"weapon_knife"
__________________
Napoleon_be is offline
Send a message via Skype™ to Napoleon_be
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 04:09.


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