Raised This Month: $ Target: $400
 0% 

give weapon using menu


  
 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
Author Message
SaM.ThE.MaN
Senior Member
Join Date: Jan 2010
Old 06-19-2010 , 16:31   give weapon using menu
Reply With Quote #1

hi,
this used to work for me long time ago, its just a test plugin i used, it gives you a weapon through the menu when you type /menu in chat.
Now it doesnt give players anything.

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

public plugin_init()
{
    
register_plugin("Beasts Cusom Menu""0.1""SaMThEMaN")
    new 
keys MENU_KEY_0|MENU_KEY_1|MENU_KEY_2
    register_menucmd
(register_menuid("Select a Weapon"), keys"giveWeapon")
    
register_clcmd("say /menu""showWeaponMenu")
}

public 
showWeaponMenu(id)
 {
    new 
menu[192]
    new 
keys MENU_KEY_0|MENU_KEY_1|MENU_KEY_2

    format
(menu191"Which Weapon?^n^n1. M4A1^n2. AK47^n3. MP5^n4. GoldenAK")
    
show_menu(idkeysmenu)
    return 
PLUGIN_HANDLED
 
}

public 
giveWeapon(idkey)
{
    switch(
key)
    {
        case 
0:
        {
            
give_item(id"weapon_m4a1")
        }
        case 
1:
        {
            
give_item(id"weapon_ak47")
        }
        case 
2:
        {
            
give_item(id"weapon_mp5navy")
        }
        case 
3:
        {
            
server_cmd("amx_goldenak #%d"get_user_userid(id))
        }
    }

__________________
  • Project : Level Plugin
o [||||||||||] - 100%
  • Project : OnePieceMod
o [||||||||||] - 20%
SaM.ThE.MaN 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 14:49.


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