Raised This Month: $ Target: $400
 0% 

Knife Menu Wont Show Up


  
 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
Bobs
Member
Join Date: Oct 2011
Old 08-05-2013 , 11:23   Re: Knife Menu Wont Show Up
Reply With Quote #8

Quote:
Originally Posted by Shooting King View Post
Old Style
PHP Code:
#include <amxmodx>
#include <fakemeta>

#define AUTHOR         "Bob"
#define VERSION     "1.0"
#define PLUGIN         "Skin Test"

new g_SKIN1[33], g_SKIN2[33];

new const 
skin1_v[] = "models/DeAth-MaNns/v_furienstyle.mdl" 
new const skin2_v[] = "models/DeAth-MaNns/v_knife.mdl" 

new gKeysMainMenu MENU_KEY_1 MENU_KEY_2 MENU_KEY_0

public 
plugin_init() 
{
    
register_plugin(PLUGINVERSIONAUTHOR);
    
    
register_clcmd("say /knife""cmd_knife");
    
register_menucmd(register_menuid("skMainMenu"), gKeysMainMenu"handleMainMenu");
}    

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))
    {
        
showMainMenu(id);
        return 
PLUGIN_HANDLED;
    }
    return 
PLUGIN_CONTINUE;
}

public 
showMainMenuid )
{    
    new 
szMainMenu[256];
    new 
size sizeofszMainMenu );
    
    
szMainMenu[0] = '^0';
    
    
addszMainMenu size "\r~[DM]~ Select Your Knife^n^n" );
    
addszMainMenu size "\r1. \wFurien Knife Skin^n" );
    
addszMainMenu size "\r2. \wDM Knife Skin^n" );
    
addszMainMenu size "^n^n\r0. \wExit^n" );
    
    
show_menuid gKeysMainMenu szMainMenu , -"skMainMenu");
    
    return 
PLUGIN_HANDLED;
}

public 
handleMainMenu(idnum)
{
    switch (
num)
    {
        case 
0
        {     
            
g_SKIN1[id] = 1;
                    
g_SKIN2[id] = 0;
                    
                    
set_pev(idpev_viewmodel2skin1_v);                    
                    
ChatColor(id"^4Furien Knife Skin");
        }
        case 
1:
        {    
            
g_SKIN1[id] = 0;
                       
g_SKIN2[id] = 1;
   
                    
set_pev(idpev_viewmodel2skin2_v);                    
                    
ChatColor(id"^4DM Knife Skin");            
        } 
        default: 
        { 
            return; 
        }
    }
}

stock ChatColor(const id, const input[], any:...) 
{
    new 
count 1players[32];
    static 
msg191 ];
    
vformatmsg190input);
        
    if(
idplayers] = id; else get_playersplayerscount"ch" )
    {
        for(new 
0counti++)
        {
            if( 
is_user_connectedplayers[i] ) )
            {
                
message_beginMSG_ONE_UNRELIABLEget_user_msgid("SayText"), _players[i] );  
                
write_byteplayers[i] );
                
write_stringmsg );
                
message_end();
            }
        }
    } 

Thanks! it working, But...It changes the knife back to "DM Knife skin" if i chose the Furien Knife Skin if there is a new round. Can you make so you have it even after a round?
Bobs 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 06:31.


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