Raised This Month: $ Target: $400
 0% 

How to change Sub-Model on player model?


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

How to change Sub-Model on player 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 , 07:22   Re: How to change Sub-Model on player model?
Reply With Quote #2

pev_body
__________________
Arkshine is offline
PRoSToTeM@
Veteran Member
Join Date: Jan 2010
Location: Russia, Ivanovo
Old 02-03-2011 , 07:24   Re: How to change Sub-Model on player model?
Reply With Quote #3

This really to change pev_body on one of part 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 , 07:31   Re: How to change Sub-Model on player model?
Reply With Quote #4

Not sure to understand what you say but pev_body works fine.
__________________
Arkshine is offline
PRoSToTeM@
Veteran Member
Join Date: Jan 2010
Location: Russia, Ivanovo
Old 02-03-2011 , 07:35   Re: How to change Sub-Model on player model?
Reply With Quote #5

I tell about this
Attached Thumbnails
Click image for larger version

Name:	ktoa.jpg
Views:	959
Size:	34.9 KB
ID:	81664  
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 , 07:44   Re: How to change Sub-Model on player model?
Reply With Quote #6

Yes.

It doesn't matter how many bodygroup you have, it's linear.

Group1

0 - submodel 1
1 - submodel 2

Group2

2 - submodel 3
3 - submodel 4

etc..

To get the second submodel of the group2, just use pev_body with 3 as value.
__________________
Arkshine is offline
SeriousSam
Senior Member
Join Date: Aug 2009
Location: Bulgaria
Old 04-25-2011 , 20:45   Re: How to change Sub-Model on player model?
Reply With Quote #7

Sorry for bumping so soon, but I kind of found out what was bugging me. Arkshine, I think that you might have a mistake here:

Quote:
Originally Posted by Arkshine View Post
Yes.

It doesn't matter how many bodygroup you have, it's linear.

Group1

0 - submodel 1
1 - submodel 2

Group2

2 - submodel 3
3 - submodel 4

etc..

To get the second submodel of the group2, just use pev_body with 3 as value.
I made a model for testing purposes with 2 bodigroups. First bodygroup - 2 submodels. Second bodygroup - 4 submodels. This results in 8 possible combinations of all submodels.

Then I tried cycling between the submodels with pev_body. Following what you said, pev_body 0 and 1 should give the 2 submodels from the first group, and pev_body 2 to 5 should give the 4 submodels from the second group. But it doesn't work this way. In fact, from 2 to 5 gives combinations from both bodygroups, but not all possible combinations. Then I realized - pev_body is not the number of one submodel, but the number of combination from all possible combinations with each submodels in all groups. In other words, 2 submodels in 1st group x 4 submodels in 2nd group = 8 combinations. Then I tried cycling pev_body from 0 to 7, and this gave me all possible combinations from both groups.

Now I only need to find out how to calculate what number to give to pev_body to get the combination that I want. Seems like SetBodygroup and GetBodygroup in HLSDK in animation.cpp do just that, but they are too hard for me to understand, can you please translate them into pawn code for me?
__________________

Last edited by SeriousSam; 04-25-2011 at 21:24.
SeriousSam is offline
Send a message via Skype™ to SeriousSam
PRoSToTeM@
Veteran Member
Join Date: Jan 2010
Location: Russia, Ivanovo
Old 02-03-2011 , 07:46   Re: How to change Sub-Model on player model?
Reply With Quote #8

thanks, how to change pev_body on 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 , 08:02   Re: How to change Sub-Model on player model?
Reply With Quote #9

I remember it's more tricky. It's something you should change using SVC_WEAPONANIM, but it reminds me it's buggy.
__________________
Arkshine is offline
Old 02-03-2011, 08:23
PRoSToTeM@
This message has been deleted by PRoSToTeM@.
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 18:23.


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