December 2013
3 Posts
Okay so I added these wings to my server for pointshop (link): [url]http://steamcommunity.com/sharedfile.../?id=107165776[/url] The white ones (default) work just fine but now I'm trying to make a second one with the black wings but I have no idea how change my lua code to get them to be the black ones they just keep loading as the default please help me! :3
here is my code for these wings:
ITEM.Name = 'Wings'
ITEM.Price = 240000
ITEM.Model = 'models/wings/wings_folded.mdl'
ITEM.Bone = 'ValveBiped.Bip01_Spine2'
function ITEM:OnEquip(ply, modifications)
ply:PS_AddClientsideModel(self.ID)
end
function ITEM:OnHolster(ply)
ply:PS_RemoveClientsideModel(self.ID)
end
function ITEM:ModifyClientsideModel(ply, model, pos, ang)
model:SetModelScale(1, 0)
pos = pos + (ang:Right() * -5) + (ang:Up() * 2) + (ang:Forward() * -48)
ang:RotateAroundAxis(ang:Right(), 270)
ang:RotateAroundAxis(ang:Up(), 90)
ang:RotateAroundAxis(ang:Forward(), 3)
return model, pos, ang
end
if SERVER then
resource.AddFile( "materials/models/wings/blackwings.vtf" )
resource.AddFile( "materials/models/wings/blackwings.vmt" )
end
All of the models and materials are in the right place!
The model 'models/wings/wings_folded.mdl' doesn't use "materials/models/wings/blackwings.vtf," it uses (what I'm assuming to be) "materials/models/wings/whitewings.vtf."
Well why would there be only 1 wings_folded.mdl and have two different colors that I can't change?
Sorry, you need to Log In to post a reply to this thread.