View Single Post
DON KHAN 1
Senior Member
Join Date: Mar 2019
Location: Pakistan
Old 08-20-2019 , 00:55   Re: VIP weapons models
Reply With Quote #14

here is the code of knife for vip plugin which is by Daminou & i have added ADMIN_LEVEL_H for this knife skin.

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

new const g_ModelKnifeCT[] = "models/vip/ct_knife.mdl" 
new const g_ModelKnifeTE[] = "models/vip/tr_knife.mdl" 

public plugin_init() 

    
register_plugin("VIP Knife models""1.1""Daminou"
     
    
register_event("CurWeapon""model_knife""b"


public 
plugin_precache()  
{  
    
precache_model(g_ModelKnifeCT)  
    
precache_model(g_ModelKnifeTE)  


public 
model_knife(id

    if(!
is_user_alive(id) || !(get_user_flags(id) & ADMIN_LEVEL_H))
    { 
        new 
clipammo 
        
new knife get_user_weapon(idclipammo
        if(
knife == CSW_KNIFE
        { 
            switch(
cs_get_user_team(id)) 
            { 
                case 
CS_TEAM_CT
                { 
                    
set_pev(idpev_viewmodel2g_ModelKnifeCT
                } 
                case 
CS_TEAM_T
                { 
                    
set_pev(idpev_viewmodel2g_ModelKnifeTE
                } 
            } 
        } 
    } 

2nd

stop bumping old thread
__________________
Facebook
My YouTube
Ro{Y}aL WarLanD CommuniTy
Selling Zombie CSO 4.3 Money System Mod

Last edited by DON KHAN 1; 08-26-2019 at 00:43.
DON KHAN 1 is offline