Raised This Month: $ Target: $400
 0% 

Knife Menu Wont Show Up


  
 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
Author Message
Bobs
Member
Join Date: Oct 2011
Old 07-23-2013 , 06:49   Knife Menu Wont Show Up
Reply With Quote #1

When i type /knife nothing pops up, it compile fine, but wont show up, can some1 help me please

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

#define VERSION "1.0"

new g_SKIN133 ], g_SKIN233 ]

new const 
skin1_v[] = "models/DeAth-MaNns/v_furienstyle.mdl" 
static const SKIN1    [ ] = "Furien Knife"

new const skin2_v[] = "models/DeAth-MaNns/v_knife.mdl" 
static const SKIN2    [ ] = "DM Knife"

public plugin_init() 
{
    
register_plugin("Skin Test"VERSION"Bob")
    
    
register_clcmd("say /knife""cmd_knife")
    
    
register_message(get_user_msgid("SayText"),"handleSayText");
}    

public 
plugin_precache()
{
    
precache_model(skin1_v)
    
precache_model(skin2_v)
}

public 
client_putinserver(id)
{
    
g_SKIN1[id] = 0
    g_SKIN2
[id] = 1
}

public 
cmd_knife(id)
{
    if(
is_user_alive(id))
    {
        new 
knife menu_create("~[DM]~ Select Your Knife""cmd_knife_h")
        
        
menu_additem(knife"Furien Knife Skin")
        
menu_additem(knife"DM Knife Skin")
    }
}

public 
cmd_knife_h(idmenuitem)
{
    if(
item == MENU_EXIT)
    {
        
menu_destroy(menu)
        return 
PLUGIN_CONTINUE
    
}
    
    switch(
item)
    {
        case 
0:
        {
            if(
read_data(2) == CSW_KNIFE)
            {
                
g_SKIN1[id] = 1
                g_SKIN2
[id] = 0
                    
                set_pev
(idpev_viewmodel2skin1_v)
                    
                
ChatColor(id"Furien Knife Skin")
            }
        }
        case 
1:
        {
            if(
read_data(2) == CSW_KNIFE)
            {
                
g_SKIN1[id] = 0
                g_SKIN2
[id] = 1
   
                set_pev
(idpev_viewmodel2skin2_v)
                    
                
ChatColor(id"DM Knife Skin")
            }
        }
    }
    return 
PLUGIN_HANDLED
}

stock ChatColor(const id, const input[], any:...) 
{
    new 
count 1players32 ]
    static 
msg191 ]
    
vformatmsg190input)
    
    
replace_allmsg190"!g""^4" )
    
replace_allmsg190"!y""^1" )
    
replace_allmsg190"!t""^3" )

    
    if(
idplayers] = id; else get_playersplayerscount"ch" )
    {
        for(new 
0counti++)
        {
            if( 
is_user_connectedplayers] ) )
            {
                
message_beginMSG_ONE_UNRELIABLEget_user_msgid("SayText"), _players] )  
                
write_byteplayers] )
                
write_stringmsg )
                
message_end( )
            }
        }
    }

Bobs is offline
 


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 06:31.


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