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

Please help


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
KING of Gold
Member
Join Date: Dec 2017
Old 01-26-2018 , 11:26   Please help
Reply With Quote #1

I want this menu for all players

My Plugin:
PHP Code:
#include <amxmodx> 
#include <cstrike> 
#include <fakemeta>

new const VIP_CT_1[] = "CT_1";
new const 
VIP_CT_MODEL_1[] = "models/player/Vip_Skin/Ct/wesker/wesker.mdl";
new const 
VIP_CT_2[] = "CT_2";
new const 
VIP_CT_MODEL_2[] = "models/player/Vip_Skin/Ct/smith/smith.mdl";
new const 
VIP_CT_3[] = "CT_3";
new const 
VIP_CT_MODEL_3[] = "models/player/Vip_Skin/Ct/agent/agent.mdl";
new const 
VIP_CT_4[] = "CT_4";
new const 
VIP_CT_MODEL_4[] = "models/player/Vip_Skin/Ct/crysis_white/crysis_white.mdl";
new const 
VIP_TT_1[] = "TT_1";
new const 
VIP_TT_MODEL_1[] = "models/player/Vip_Skin/Trr/Crysis_Black/Crysis_Black.mdl";
new const 
VIP_TT_2[] = "TT_2";
new const 
VIP_TT_MODEL_2[] = "models/player/Vip_Skin/Trr/DEvil_Macy/DEvil_Macy.mdl";
new const 
VIP_TT_3[] = "TT_3";
new const 
VIP_TT_MODEL_3[] = "models/player/Vip_Skin/Trr/Ukranian/Ukranian.mdl";
new const 
VIP_TT_4[] = "TT_4";
new const 
VIP_TT_MODEL_4[] = "models/player/Vip_Skin/Trr/Nero/Nero.mdl";

new 
player_model[33][32];
new 
bool:g_model[33];

#define PLUGIN "Skin Vip Menu" 
#define VERSION "3.0" 
#define AUTHOR "AdmiN AlferD" 

public plugin_precache() {
    
precache_model(VIP_TT_MODEL_1)
    
precache_model(VIP_TT_MODEL_2)
    
precache_model(VIP_TT_MODEL_3)
    
precache_model(VIP_TT_MODEL_4)
    
precache_model(VIP_CT_MODEL_1)
    
precache_model(VIP_CT_MODEL_2)
    
precache_model(VIP_CT_MODEL_3)
    
precache_model(VIP_CT_MODEL_4)
}

public 
plugin_init() { 
    
register_plugin(PLUGINVERSIONAUTHOR
    
    
register_forward(FM_SetClientKeyValue"fw_SetClientKeyValue")
    
register_forward(FM_ClientUserInfoChanged"fw_ClientUserInfoChanged")
    
    
register_clcmd"say /vskin",  "Skins_Menu"ADMIN_LEVEL_H ); 


public 
Skins_Menu(id) {  
    new 
menu menu_create("Select Your Skin""skin_menu")
    if(
cs_get_user_team(id) & CS_TEAM_CT) {
        
menu_additemmenu"Wesker""1"ADMIN_LEVEL_H );  
        
menu_additemmenu"Smith""2"ADMIN_LEVEL_H );
        
menu_additemmenu"Agent""3"ADMIN_LEVEL_H );
        
menu_additemmenu"Crysis White""4"ADMIN_LEVEL_H );
    }
    else if(
cs_get_user_team(id) & CS_TEAM_T) {
        
menu_additemmenu"Crysis Black""5"ADMIN_LEVEL_H );  
        
menu_additemmenu"DEvil_Macy""6"ADMIN_LEVEL_H );
        
menu_additemmenu"Ukranian""7"ADMIN_LEVEL_H );
        
menu_additemmenu"Nero""8"ADMIN_LEVEL_H );
    }
    
    
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: { 
            
Model_CT_1(id)
        } 
        case 
2: { 
            
Model_CT_2(id)
        } 
        case 
3: { 
            
Model_CT_3(id)
        } 
        case 
4: { 
            
Model_CT_4(id)
        } 
        case 
5: { 
            
Model_TT_1(id
        } 
        case 
6: { 
            
Model_TT_2(id)
        } 
        case 
7: { 
            
Model_TT_3(id
        } 
        case 
8: { 
            
Model_TT_4(id)
        }
    } 
    return 
PLUGIN_CONTINUE
}

public 
Model_CT_1(id) {
    
copy(player_model[id], 31VIP_CT_1)
            
    new 
currentmodel[32];
    
fm_get_user_model(idcurrentmodelsizeof currentmodel 1);
                
    if(!
equal(currentmodelplayer_model[id])) {
        
fm_set_user_model(idplayer_model[id])
    }
}

public 
Model_CT_2(id) {
    
copy(player_model[id], 31VIP_CT_2)
            
    new 
currentmodel[32];
    
fm_get_user_model(idcurrentmodelsizeof currentmodel 1);
                
    if(!
equal(currentmodelplayer_model[id])) {
        
fm_set_user_model(idplayer_model[id])
    }
}

public 
Model_CT_3(id) {
    
copy(player_model[id], 31VIP_CT_3)
            
    new 
currentmodel[32];
    
fm_get_user_model(idcurrentmodelsizeof currentmodel 1);
                
    if(!
equal(currentmodelplayer_model[id])) {
        
fm_set_user_model(idplayer_model[id])
    }
}

public 
Model_CT_4(id) {
    
copy(player_model[id], 31VIP_CT_4)
            
    new 
currentmodel[32];
    
fm_get_user_model(idcurrentmodelsizeof currentmodel 1);
                
    if(!
equal(currentmodelplayer_model[id])) {
        
fm_set_user_model(idplayer_model[id])
    }
}

public 
Model_TT_1(id) {
    
copy(player_model[id], 31VIP_TT_1)
            
    new 
currentmodel[32];
    
fm_get_user_model(idcurrentmodelsizeof currentmodel 1);
                
    if(!
equal(currentmodelplayer_model[id])) {
        
fm_set_user_model(idplayer_model[id])
    }
}

public 
Model_TT_2(id) {
    
copy(player_model[id], 31VIP_TT_2)
            
    new 
currentmodel[32];
    
fm_get_user_model(idcurrentmodelsizeof currentmodel 1);
                
    if(!
equal(currentmodelplayer_model[id])) {
        
fm_set_user_model(idplayer_model[id])
    }
}

public 
Model_TT_3(id) {
    
copy(player_model[id], 31VIP_TT_3)
            
    new 
currentmodel[32];
    
fm_get_user_model(idcurrentmodelsizeof currentmodel 1);
                
    if(!
equal(currentmodelplayer_model[id])) {
        
fm_set_user_model(idplayer_model[id])
    }
}

public 
Model_TT_4(id) {
    
copy(player_model[id], 31VIP_TT_4)
            
    new 
currentmodel[32];
    
fm_get_user_model(idcurrentmodelsizeof currentmodel 1);
                
    if(!
equal(currentmodelplayer_model[id])) {
        
fm_set_user_model(idplayer_model[id])
    }
}

public 
fw_SetClientKeyValue(idinfobufferkey[], value[]) {   
    if (
g_model[id] && equal(key"model"))
        return 
FMRES_SUPERCEDE
    
    
return FMRES_IGNORED
}

public 
fw_ClientUserInfoChanged(idinfobuffer) {   
    if (!
g_model[id])
        return 
FMRES_IGNORED
    
    
new currentmodel[32]; 
    
fm_get_user_model(idcurrentmodelsizeof currentmodel 1);
    
    if(!
equal(currentmodelplayer_model[id]))
        
fm_set_user_model(idplayer_model[id]) 
    
    return 
FMRES_IGNORED
}

stock fm_set_user_model(playermodelname[]) {   
    
engfunc(EngFunc_SetClientKeyValueplayerengfunc(EngFunc_GetInfoKeyBufferplayer), "model"modelname)
    
    
g_model[player] = true
}

stock fm_get_user_model(playermodel[], len) {   
    
engfunc(EngFunc_InfoKeyValueengfunc(EngFunc_GetInfoKeyBufferplayer), "model"modellen)
}

stock fm_reset_user_model(player) {         
    
g_model[player] = false
    
    dllfunc
(DLLFunc_ClientUserInfoChangedplayerengfunc(EngFunc_GetInfoKeyBufferplayer))

__________________
Cs KING of Gold
AlferD
KING of Gold is offline
Hey
Member
Join Date: Dec 2017
Old 01-26-2018 , 11:41   Re: Please help
Reply With Quote #2

This is not the right section to post a code and ask for someone else to fix/make it for you this is a section where you post your problem and people here tell you how to fix it yourself, if you post in this section you should have at least basic knowledge, next time post in the right section.
Hey is offline
DjSoftero
Veteran Member
Join Date: Nov 2014
Location: Lithuania
Old 01-26-2018 , 11:54   Re: Please help
Reply With Quote #3

__________________
retired chump
DjSoftero is offline
OciXCrom
Veteran Member
Join Date: Oct 2013
Location: Macedonia
Old 01-26-2018 , 12:22   Re: Please help
Reply With Quote #4

How dumb do you need to be to post in the wrong section 30+ times, while in every thread people tell you the exact same thing?
__________________
OciXCrom is offline
Send a message via Skype™ to OciXCrom
Reply



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 00:49.


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