• Changing Weapon Models
    1 replies, posted
I am trying to create a weapon that uses a different model based on which player is holding it. I was using the pointshop modifications to determine which model to use, so I get the model using [lua] local models = { {'model1' , 'v_model'}, {'model2' , 'v_model2'}, } local use_model = default_model function SWEP:Equip(ply) if ply:PS_HasItemEquipped('weapon') and ply.PS_Items['weapons'].Modifiers['text'] then for k, v in pairs(models) do if ply.PS_Items['weapons'].Modifiers['text'] == v[1] then use_model = v[2] break end end end end [/lua] Although I am unsure of how to actually change the model after that. So how would I get the model to change once a player picks it up?
Would it just be easier to create multiple weapons using separate models or is it possible to have the model of the weapon change depending on the last owner. Example: If the weapon is on the ground use the 'w_rif_ak47.mdl' When picked up by a player the model will change.
Sorry, you need to Log In to post a reply to this thread.