Raised This Month: $ Target: $400
 0% 

Solved [HELP] Buy weapon menu...


  
 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
Author Message
CrazY.
Veteran Member
Join Date: May 2015
Location: SP, Brazil
Old 03-29-2017 , 19:30   [HELP] Buy weapon menu...
Reply With Quote #1

Hy, I'm trying do this to make a weapons buy menu but I dont know how to get what weapon the player has selected. Any idea?

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

new const WEAPON_ENT_NAMES[][] =
{
    
"weapon_ak47",
    
"weapon_m4a1"
}

new const 
WEAPON_NAMES[sizeof(WEAPON_ENT_NAMES)][] =
{
    
"Ak-47",
    
"M4a1"
}

public 
plugin_init()
{
    
register_clcmd("say menu""show_menu_game");
}

public 
menu_game(idmenuitem)
{
    new 
weapon[32];
    
    
// And here, what I need do??
    
    
give_item(idweapon);
    
    
menu_destroy(menu);
    return 
PLUGIN_HANDLED;
}

public 
show_menu_game(id)
{
    new 
menu menu_create("Title of menu""menu_game");
    
    for (new 
0sizeof (WEAPON_NAMES); i++)
        
menu_additem(menuWEAPON_NAMES[i], ""0);
        
    
menu_setprop(menuMPROP_EXITMEXIT_ALL);
        
    
menu_displayidmenu);
    
    return 
PLUGIN_HANDLED;

__________________









Last edited by CrazY.; 03-30-2017 at 18:16.
CrazY. 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 17:51.


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