Sign in to follow this  
Followers 0
NinjaWa

Select Skin

3 posts in this topic

Hello, I'm having a bit of trouble as I'm looking at CoD4 sources and some mods sources but none of them (I don't find) shows a way in how to set a skin for a weapon.

 

I don't want to create a different "weapon" for each skin as I don't want to reach the weapons asset limit (128), I've already in use ~40 weapon files.

 

I know that I need to create viewmodels, worldmodels, images, materials and material_proterties for each skin, I've been looking at some default CoD4 weapon files and they have this:

gunModel\viewmodel_remington700_mp\gunModel2\viewmodel_remington700_mp_brock\gunModel3\viewmodel_remington700_mp_bshdwl\gunModel4\viewmodel_remington700_mp_bwmrpt\gunModel5\viewmodel_remington700_mp_cmdtgr\gunModel6\viewmodel_remington700_mp_stagger\gunModel7\\gunModel8\\gunModel9\\gunModel10\\gunModel11\\gunModel12\\gunModel13\\gunModel14\\gunModel15\\gunModel16\

So in theory I would be able to set-up 16 viewmodels for the R700 weapon, the thing is how do I select each of them?

 

 

 

Any help is appreciated, thanks :dave:

0

Share this post


Link to post
Share on other sites

Hello, I'm having a bit of trouble as I'm looking at CoD4 sources and some mods sources but none of them (I don't find) shows a way in how to set a skin for a weapon.

I don't want to create a different "weapon" for each skin as I don't want to reach the weapons asset limit (128), I've already in use ~40 weapon files.

I know that I need to create viewmodels, worldmodels, images, materials and material_proterties for each skin, I've been looking at some default CoD4 weapon files and they have this:

gunModel\viewmodel_remington700_mp\gunModel2\viewmodel_remington700_mp_brock\gunModel3\viewmodel_remington700_mp_bshdwl\gunModel4\viewmodel_remington700_mp_bwmrpt\gunModel5\viewmodel_remington700_mp_cmdtgr\gunModel6\viewmodel_remington700_mp_stagger\gunModel7\\gunModel8\\gunModel9\\gunModel10\\gunModel11\\gunModel12\\gunModel13\\gunModel14\\gunModel15\\gunModel16\
So in theory I would be able to set-up 16 viewmodels for the R700 weapon, the thing is how do I select each of them?

Any help is appreciated, thanks :dave:

I'm probably an idiot, read below.
0

Share this post


Link to post
Share on other sites

giveWeapon() takes a second argument which is the gunModel you want:

player giveWeapon( "weaponname", 1 ); // 0-indexed so this is gunModel 2
0

Share this post


Link to post
Share on other sites

Please sign in to comment

You will be able to leave a comment after signing in



Sign In Now
Sign in to follow this  
Followers 0