• Applying playermodel's colour to player's corpse (TTT)
    0 replies, posted
I've recently made some of the playermodels in my pointshop colourable and have added the ability for players to colour said models. However, whenever a player dies, their corpse will understandably not inherit the colour of the playermodel. My question is this: how can I change either the pointshop item's code or the gamemode code to add the playermodel's colour to the corpse? The code I am using can be seen below: [code]function ITEM:OnEquip(ply, modifications) if not ply._OldModel then ply._OldModel = ply:GetModel() end if modifications.color ~= nil then borkolor = modifications.color ply:SetPlayerColor(Vector( borkolor.r / 255, borkolor.g / 255, borkolor.b / 255)) end timer.Simple(1, function() ply:SetModel(self.Model) end) end function ITEM:OnHolster(ply) if ply._OldModel then ply:SetModel(ply._OldModel) ply:SetPlayerColor(Vector(0.24, 0.34, 0.41)) end end function ITEM:Modify(modifications) PS:ShowColorChooser(self, modifications) end function ITEM:OnModify(ply, modifications) self:OnHolster(ply) self:OnEquip(ply, modifications) end[/code] On a side-note, is there any way to change the specific colour of playermodel, as many of them use the default blue which doesn't match some of my playermodel's well. Thanks for any help! :D
Sorry, you need to Log In to post a reply to this thread.