AlliedModders

AlliedModders (https://forums.alliedmods.net/index.php)
-   Scripting Help (https://forums.alliedmods.net/forumdisplay.php?f=11)
-   -   Model skin count (https://forums.alliedmods.net/showthread.php?t=214505)

.Dare Devil. 04-27-2013 21:06

Model skin count
 
How to get total skin count inside of model?
Thanks!

Leon M. 04-28-2013 00:39

Re: Model skin count
 
Open the model and take a look at the bodies and skins. So you need to pre-define them in your sma file manually.

Default body/skin for your used model is 0.

.Dare Devil. 04-28-2013 04:18

Re: Model skin count
 
Quote:

Originally Posted by Leon M. (Post 1941341)
Open the model and take a look at the bodies and skins. So you need to pre-define them in your sma file manually.

Default body/skin for your used model is 0.

I like to get this in plugin ( plugin_precache ) it will make life much easier.

Arkshine 04-28-2013 05:04

Re: Model skin count
 
Code:
getSkinCount( const model[] ) {     new skinCount;         new f = fopen( model, "rb" );         if( f )     {         const studioHeader_NumSkin = 196;         fseek( f, studioHeader_NumSkin, SEEK_SET );         fread( f, skinCount, BLOCK_INT );                 fclose( f );     }         return skinCount; }

.Dare Devil. 04-28-2013 05:06

Re: Model skin count
 
Quote:

Originally Posted by Arkshine (Post 1941441)
Code:
getSkinCount( const model[] ) {     new skinCount;         new f = fopen( model, "rb" );         if( f )     {         const studioHeader_NumSkin = 196;         fseek( f, studioHeader_NumSkin, SEEK_SET );         fread( f, skinCount, BLOCK_INT );                 fclose( f );     }         return skinCount; }

thanks!


All times are GMT -4. The time now is 10:56.

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