Okay so I co-run a TTT server that offers playermodels in the pointshop. We have a few that work out fine but I’m always looking for new models that interest our community. I was interested in adding the “Halo 3 Playermodels” ( workshop found here http://steamcommunity.com/sharedfiles/filedetails/?id=132286705 ), but I was trying to figure out how to change the bodygroup so that when you purchase one of the models in the pointshop, it would equip you with that playermodel’s bodygroup rather than a default Spartan. If you’re unfamiliar with these playermodels, which I’m sure most will be, the player models have 3 bodygroup “groups”. A bodygroup for the head, shoulders, and body. Also, I know in Sandbox all you have to do is go into playermodels and move the sliders accordingly to select your various bodygroups ( or use the console command while aiming at the ragdoll ), incase anyone mistakes my question for Sandbox.
Regardless, one of the lua files for a playermodel I have in the pointshop looks like this. Obviously very typical for a pointshop’s playermodel.
ITEM.Name = 'spartan_green' ITEM.Price = 0 ITEM.Model = 'models/player/halo3/spartan_green.mdl' function ITEM:OnEquip(ply, modifications) if not ply._OldModel then ply._OldModel = ply:GetModel() end timer.Simple(1, function() ply:SetModel(self.Model) end) end function ITEM:OnHolster(ply) if ply._OldModel then ply:SetModel(ply._OldModel) end end function ITEM:PlayerSetModel(ply) ply:SetModel(self.Model) end if (SERVER) then player_manager.AddValidModel( "spartan_green", "models/player/halo3/spartan_green.mdl" ) AddCSLuaFile( "spartan_green.lua" ) end list.Set( "PlayerOptionsModel", "spartan_green", "models/player/halo3/spartan_green.mdl" )
Along with the models, the .vmt’s for the seperate bodygroups go by color as well, so there’s a folder for each color respectively. So to break down the question a little more, let’s imagine I wanted to add “hayabusa” bodygroup to my green spartan, which would be found in materials/models/player/halo3/hayabusa_green and would contain hayabusa.vmt, hayabusa.vtf and hayabusa.visor.vmt. How could I implement that into the pointshop playermodel?
Hopefully my question wasn’t too terribly written or confusing. If you need any clarification I’ll try my best. Thanks!