Raised This Month: $ Target: $400
 0% 

Temporaly change model


  
 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
Author Message
HumanMod
Junior Member
Join Date: Mar 2009
Old 05-30-2009 , 11:03   Temporaly change model
Reply With Quote #1

Hi I've been trying all day to change models but with no success. Could someone help me to do that? Here is my code:
Code:
public plugin_precache()
{        
    precache_model("models/knife/v_knife.mdl")
}

public zp_extra_item_selected(player, itemid)
{
    if(itemid == g_sps)
    {    
        
        g_hassps[player] = 1
        
        new temp[2], weaponID = get_user_weapon(player, temp[0], temp[1])
        if(weaponID == CSW_KNIFE) 
        {
            entity_set_string(player, EV_SZ_viewmodel, "models/knife/v_knife.mdl")
        }
        
    }
        return PLUGIN_CONTINUE
}
I need to change the model when player buys that item
HumanMod 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 13:50.


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