View Single Post
Damizean
SourceMod Donor
Join Date: Mar 2009
Old 07-27-2009 , 20:34   Re: [TF2] Wearables for everyone!
Reply With Quote #17

Well, I've integrated a small dependencies system to manage the download of the wearable items. Let's say you have your custom model, located at:
Code:
/models/custom/hats/hat.mdl
After reading the model location from the list, the plugin will automatically try to find if a dependencies list file is available for this model, being this dependencies file being named the same as the model, but adding .dep at the end
Code:
/models/custom/hats/hat.mdl.dep
The dependencies file is just a bunch of lines with the files required for that model to correctly work, example extracted from one of my custom hats:
Code:
materials/models/rss-custom/hats/samus/samus-blue.vtf
materials/models/rss-custom/hats/samus/samus.vtf
materials/models/rss-custom/hats/samus/samus-blue.vmt
materials/models/rss-custom/hats/samus/samus.vmt
models/rss-custom/hats/samus/samus.mdl
models/rss-custom/hats/samus/samus.dx80.vtx
models/rss-custom/hats/samus/samus.dx90.vtx
models/rss-custom/hats/samus/samus.sw.vtx
models/rss-custom/hats/samus/samus.vvd
models/rss-custom/hats/samus/samus.phy
Depending on the extension of each file listed, it'll automatically determine the type and preload it correctly. I'm going to attach the Samus helmet so you can see how it's set up.

Quote:
Can you make it so people with certain flags automatically have certain things?
Do you mean equip automatically with a certain hat the people with the flags? It's doable, I'll make sure to add that for next version.
Attached Files
File Type: zip samus.zip (233.0 KB, 487 views)
__________________
Dat annoying guy

Last edited by Damizean; 07-27-2009 at 21:02.
Damizean is offline
Send a message via AIM to Damizean Send a message via MSN to Damizean