AlliedModders

AlliedModders (https://forums.alliedmods.net/index.php)
-   Scripting Help (https://forums.alliedmods.net/forumdisplay.php?f=11)
-   -   [SOLVED] PW model w/ sub-models & how to unprecache sounds. (https://forums.alliedmods.net/showthread.php?t=185775)

jc980 05-21-2012 09:57

[SOLVED] PW model w/ sub-models & how to unprecache sounds.
 
1 Attachment(s)
Hey guys I need some help.

For example I have a world/player model that has different submodels ( multi-weapon model, I will upload an example )

How do I "Switch the sub-model" from 1 to 2 or 5th sub-model? For both P and W model.

Also how to unprecache sounds, if its exists already please show me a link.

csoldjb 05-21-2012 22:55

Re: [Help] PW model w/ sub-models & how to unprecache sounds.
 
set_pev(iEnt,pev_body,XX) XX is the submodel number.

jc980 05-22-2012 01:00

Re: [Help] PW model w/ sub-models & how to unprecache sounds.
 
Quote:

Originally Posted by csoldjb (Post 1714040)
set_pev(iEnt,pev_body,XX) XX is the submodel number.

should put this after setting the W model and for the P model as well?

How to unprecache sounds too?

Hyper Nova 05-22-2012 01:42

Re: [Help] PW model w/ sub-models & how to unprecache sounds.
 
i found this code somewhere on this forum, i dont remember anymore where but i writed it on my special code list :)

here it is.

PHP Code:

SendWeaponAnim( const Player, const Sequence 


    
set_pev(Playerpev_weaponanimSequence

    
message_begin(MSG_ONESVC_WEAPONANIM, .player Player 
    
write_byteSequence 
    
write_byte(1
    
message_end( ) 



I dont know about how to use this, i have not tried this yet but i think it is just that way

SendWeaponAnim( id, 0 )

param2: 0 is sub model number.

example if you have 3 submodels in your v_ model then it will be just like that
0 , 1 , 2

jc980 05-22-2012 03:07

Re: [Help] PW model w/ sub-models & how to unprecache sounds.
 
Quote:

Originally Posted by Hyper Nova (Post 1714075)
i found this code somewhere on this forum, i dont remember anymore where but i writed it on my special code list :)

here it is.

PHP Code:

SendWeaponAnim( const Player, const Sequence 


    
set_pev(Playerpev_weaponanimSequence

    
message_begin(MSG_ONESVC_WEAPONANIM, .player Player 
    
write_byteSequence 
    
write_byte(1
    
message_end( ) 



I dont know about how to use this, i have not tried this yet but i think it is just that way

SendWeaponAnim( id, 0 )

param2: 0 is sub model number.

example if you have 3 submodels in your v_ model then it will be just like that
0 , 1 , 2

Your out of the topic, I need to make the sub-models switch its appearance in WORLD AND PLAYER MODELS.

Hyper Nova 05-22-2012 03:38

Re: [Help] PW model w/ sub-models & how to unprecache sounds.
 
Quote:

Originally Posted by jc980 (Post 1714106)
Your out of the topic, I need to make the sub-models switch its appearance in WORLD AND PLAYER MODELS.

I was thinking that you want to change w model to
set_pev(id ,pev_body, 0)
param 3 ( key 0 ) work same as i said for v model

Quote:

should put this after setting the W model and for the P model as well?

How to unprecache sounds too?
Ofcourse, other ways you set old model sub model.

jc980 05-22-2012 04:38

Re: [Help] PW model w/ sub-models & how to unprecache sounds.
 
Testing it later, and how to precache sounds, please reply.


All times are GMT -4. The time now is 23:13.

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