Raised This Month: $ Target: $400
 0% 

Team Knife Model


  
 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
MiniBrackeur
Senior Member
Join Date: Oct 2010
Old 07-02-2012 , 15:46   Re: Team Knife Model
Reply With Quote #5

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

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

public plugin_init()
{
    
register_plugin("Knife models""1.0""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) && is_user_connected(id))
    {
        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)
                }
            }
        }
    }

__________________
MiniBrackeur => Daminou
MiniBrackeur 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 15:12.


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