Change Weapon Sub-Model (v_)
I have seen alot of threads about this topic but none of them had the solution.
I got a v_ model, it contains multiple sub-models inside. I want to choose wich sub-model will be shown. This is the code to set viewmodel: PHP Code:
Now, how can i choose wich sub-model will be shown? I know for body models i just need to do: PHP Code:
How can i do the same for weapon v_ models? I saw this code somewhere else PHP Code:
http://i.imgur.com/Zjerbuz.jpg Can somebody tell me a way to achieve this? Thank you. |
Re: Change Weapon Sub-Model (v_)
Without the model attached we can only guess. Maybe it is a "skin" part. So try pev_skin
|
Re: Change Weapon Sub-Model (v_)
Quote:
However, with models with many "submodel" groups I don't know if it'll work. Since I don't know which one is changing. |
Re: Change Weapon Sub-Model (v_)
Quote:
|
Re: Change Weapon Sub-Model (v_)
You cant set it because of client prediction. v_ models are handled client-side, and no matter how many times you change the v_ submodel, it will always set it back to the first one. Submodels work fine on p_ and w_ models, but they dont work with v_ models.
|
Re: Change Weapon Sub-Model (v_)
Quote:
|
Re: Change Weapon Sub-Model (v_)
I don't know if this will work, but try this:
Hook UpdateClientData, see if the viewmodel is the custom one one you set. If it is, then set a task for about 0.5 seconds or more to send an SVC_WEAPONANIM MSG to the client (You have to delay this for the Update MSG to be sent to the client first). Set the weapon animation and bodygroup as needed. Code:
stock SendWeaponAnim( id, iAnim, iBody ) |
Re: Change Weapon Sub-Model (v_)
Quote:
Quote:
Quote:
PHP Code:
Quote:
Btw user Backstabnoob said it will look bad... (https://forums.alliedmods.net/showpo...0&postcount=25) I guess i should forget this and just make seperated model files. Too much work and it will not look good. |
Re: Change Weapon Sub-Model (v_)
I know one way, but it's poor way, cpu expensive, and will not look 100% fine. Sometimes it will show the first body of list since it will be frame per frame
|
Re: Change Weapon Sub-Model (v_)
I've seen the solution in backweapons plugin.
you need to use pev_body (int) to change the submodel |
| All times are GMT -4. The time now is 18:43. |
Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.