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

[Help] player model Menu


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
Mikaeel123
Senior Member
Join Date: Oct 2018
Old 05-20-2020 , 07:36   [Help] player model Menu
Reply With Quote #1

Hello . i just made a player model menu . its not working. whats my problem ?
PHP Code:
#include < amxmodx > 
#include < cstrike > 

#define PLUGIN "Vip Skins Menu" 
#define VERSION "1.0" 
#define AUTHOR "Thew_ConFiger" 

public plugin_precache() 

    
precache_model("models/player/Ng_Skin/Gro.mdl"); 
    
precache_model("models/player/Ng_Skin/gsg91.mdl"); 
    
precache_model("models/player/Ng_Skin/leet3.mdl"); 
    
precache_model("models/player/Ng_Skin/sas2.mdl");
    
precache_model("models/player/Ng_Skin/girl.mdl");


public 
plugin_init() { 
    
register_plugin(PLUGINVERSIONAUTHOR
    
    
register_clcmd"say /skin",  "Skins_Menu" ); 


public 
Skins_Menuid )  
{  
    new 
menu menu_create("[NativeGame] Select Your Skin""skin_menu")
    if(
cs_get_user_team(id) & CS_TEAM_CT)
    {
        
menu_additemmenu"Player Skin""1"ADMIN_ALL );  
        
menu_additemmenu"Vip Skin""2"ADMIN_RESERVATION );
    
menu_additemmenu"Admins Skin""2"ADMIN_KICK );
    
menu_additemmenu"Manager Skin""2"ADMIN_IMMUNITY );
    
menu_additemmenu"Owner Skin ""2"ADMIN_RCON );
    }
    else if(
cs_get_user_team(id) & CS_TEAM_T)
    {
        
menu_additemmenu"Player Skin""1"ADMIN_ALL );  
        
menu_additemmenu"Vip Skin""2"ADMIN_RESERVATION );
    
menu_additemmenu"Admins Skin""2"ADMIN_KICK );
    
menu_additemmenu"Manager Skin""2"ADMIN_IMMUNITY );
    
menu_additemmenu"Owner Skin ""2"ADMIN_RCON );
    }
    
    
menu_setpropmenuMPROP_EXITMEXIT_ALL );   
    
menu_displayidmenu);  
}  

public 
skin_menu(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 
1
        { 
            
cs_set_user_model(id"Gro"
        } 
        case 
2
        { 
            
cs_set_user_model(id"gsg91"
        } 
        case 
3
        { 
            
cs_set_user_model(id"leet3"
        } 
        case 
4
        { 
            
cs_set_user_model(id"sas2"
        }
        case 
5
        { 
            
cs_set_user_model(id"girl"
        }
        case 
6
        { 
            
cs_set_user_model(id"Gro"
        }
        case 
7
        { 
            
cs_set_user_model(id"gsg91"
        }
        case 
8
        { 
            
cs_set_user_model(id"leet3"
        }
        case 
9
        { 
            
cs_set_user_model(id"sas2"
        }
        case 
10
        { 
            
cs_set_user_model(id"girl"
        }
    } 
    return 
PLUGIN_CONTINUE


Last edited by Mikaeel123; 05-20-2020 at 07:36.
Mikaeel123 is offline
OciXCrom
Veteran Member
Join Date: Oct 2013
Location: Macedonia
Old 05-20-2020 , 10:17   Re: [Help] player model Menu
Reply With Quote #2

The model paths are incorrect. They must follow the format:

models/player/model_name/model_name.mdl

Use this or take it as an example - https://forums.alliedmods.net/showpo...77&postcount=6
It's much better coded and easy to configure.
__________________

Last edited by OciXCrom; 05-20-2020 at 10:17.
OciXCrom is offline
Send a message via Skype™ to OciXCrom
Reply


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 10:13.


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