Raised This Month: $ Target: $400
 0% 

How to change Sub-Model on player model?


Post New Thread Reply   
 
Thread Tools Display Modes
PRoSToTeM@
Veteran Member
Join Date: Jan 2010
Location: Russia, Ivanovo
Old 02-03-2011 , 09:23   Re: How to change Sub-Model on player model?
Reply With Quote #11

I tested pev_body, it change model body and v_model body, I think to change body v_model I must add two or many empty body in v_model
PRoSToTeM@ is offline
Send a message via ICQ to PRoSToTeM@ Send a message via Skype™ to PRoSToTeM@
Arkshine
AMX Mod X Plugin Approver
Join Date: Oct 2005
Old 02-03-2011 , 09:25   Re: How to change Sub-Model on player model?
Reply With Quote #12

If you have a weapon model v_, please attach one, so I can test too.
__________________
Arkshine is offline
PRoSToTeM@
Veteran Member
Join Date: Jan 2010
Location: Russia, Ivanovo
Old 02-03-2011 , 09:39   Re: How to change Sub-Model on player model?
Reply With Quote #13

http://www.mediafire.com/?nim3egmg6m31s66
PRoSToTeM@ is offline
Send a message via ICQ to PRoSToTeM@ Send a message via Skype™ to PRoSToTeM@
SeriousSam
Senior Member
Join Date: Aug 2009
Location: Bulgaria
Old 04-14-2011 , 16:40   Re: How to change Sub-Model on player model?
Reply With Quote #14

I'm interested in this as well. You don't need to look for a model elsewhere, check out half-life's 357 python revolver: in single player it doesn't have a laser sight, in multiplayer it has a laser sight attached under the barrel. If you open the model in JHLMV you will see that the laser sight is added as submodel 2. In the multiplayer section of HLSDK you can see it being activated like this:
PHP Code:
BOOL CPython::Deploy( )
{
#ifdef CLIENT_DLL
    
if ( bIsMultiplayer() )
#else
    
if ( g_pGameRules->IsMultiplayer() )
#endif
    
{
        
// enable laser sight geometry.
        
pev->body 1;
    }
    else
    {
        
pev->body 0;
    }

    return 
DefaultDeploy"models/v_357.mdl""models/p_357.mdl"PYTHON_DRAW"python"UseDecrement(), pev->body );

So, there should be a way to call pev_body on a viewmodel, I just have no idea how to in amxx
__________________
SeriousSam is offline
Send a message via Skype™ to SeriousSam
Arkshine
AMX Mod X Plugin Approver
Join Date: Oct 2005
Old 04-14-2011 , 16:56   Re: How to change Sub-Model on player model?
Reply With Quote #15

Like already said, just call pev_body.
__________________
Arkshine is offline
SeriousSam
Senior Member
Join Date: Aug 2009
Location: Bulgaria
Old 04-14-2011 , 16:59   Re: How to change Sub-Model on player model?
Reply With Quote #16

call it on what? the player id? 'cuz as far as I know, the v_ model of the weapon is not a separate entity like the w_ model is...
__________________
SeriousSam is offline
Send a message via Skype™ to SeriousSam
Arkshine
AMX Mod X Plugin Approver
Join Date: Oct 2005
Old 04-14-2011 , 17:04   Re: How to change Sub-Model on player model?
Reply With Quote #17

Weapon index.
__________________
Arkshine is offline
SeriousSam
Senior Member
Join Date: Aug 2009
Location: Bulgaria
Old 04-14-2011 , 17:06   Re: How to change Sub-Model on player model?
Reply With Quote #18

I see... so for custom weapons I should call it on CSW_KNIFE, right? What about p_ models? The same way?
__________________
SeriousSam is offline
Send a message via Skype™ to SeriousSam
Arkshine
AMX Mod X Plugin Approver
Join Date: Oct 2005
Old 04-14-2011 , 17:10   Re: How to change Sub-Model on player model?
Reply With Quote #19

It doesn't matter the weapons, custom or not. What is important is the model. Once you have a model, calling pev_body on the current weapon index should work.
__________________
Arkshine is offline
SeriousSam
Senior Member
Join Date: Aug 2009
Location: Bulgaria
Old 04-14-2011 , 17:37   Re: How to change Sub-Model on player model?
Reply With Quote #20

I can't seem to make it work. I tried this with the 357:
set_pev(get_user_weapon(id), pev_body, 1);
inside the draw event, but no laser sight... Also, this way I think it won't be set per player, so maybe I need to try the SVC_WEAPONANIM way you were talking for in the last page? What is it?
__________________

Last edited by SeriousSam; 04-14-2011 at 17:55.
SeriousSam is offline
Send a message via Skype™ to SeriousSam
Reply



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 07:25.


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