Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- hook.Add("OnEntityCreated", "correctStalkersClientside", function(ent)
- if (ent.IsZombie and ent:IsZombie()) or ent:GetClass()=="npc_zombie_torso" or ent:GetClass()=="npc_sstalker" or ent:GetClass()=="npc_poisonzombie" or ent:GetClass()=="npc_zombie" or ent:GetClass()=="npc_fastzombie" then
- ent.CharacterModels={
- "models/Humans/Group01/Female_01.mdl",
- "models/Humans/Group01/Female_02.mdl",
- "models/Humans/Group01/Female_03.mdl",
- "models/Humans/Group01/Female_04.mdl",
- "models/Humans/Group01/Female_06.mdl",
- "models/Humans/Group01/Female_07.mdl",
- "models/Humans/group01/male_01.mdl",
- "models/Humans/Group01/Male_02.mdl",
- "models/Humans/Group01/male_03.mdl",
- "models/Humans/Group01/Male_04.mdl",
- "models/Humans/Group01/Male_05.mdl",
- "models/Humans/Group01/Male_06.mdl",
- "models/Humans/Group01/Male_07.mdl",
- "models/Humans/Group01/Male_08.mdl",
- "models/Humans/Group01/Male_09.mdl"
- }
- ent:CallOnRemove("getRidOfclientModel", function(self)
- if IsValid(self.ModelToDraw) then
- self.ModelToDraw:Remove()
- end
- end)
- ent.RenderOverride=function(self)
- self:DrawModel()
- self:SetMaterial("engine/occlusionproxy")
- if !IsValid(self.ModelToDraw) then
- self.VirtualModel=self.VirtualModel or table.Random(self.CharacterModels)
- self.ModelToDraw=ClientsideModel(self.VirtualModel)
- self.ModelToDraw:SetParent(self)
- self.ModelToDraw:AddEffects(bit.bor(EF_BONEMERGE, EF_PARENT_ANIMATES))
- end
- //self.ModelToDraw:RemoveEffects(bit.bor(EF_BONEMERGE, EF_PARENT_ANIMATES))
- if string.find(self:GetClass(), "torso") then
- local bonesToHide={
- "ValveBiped.Bip01_Pelvis",
- "ValveBiped.Bip01_R_Thigh",
- "ValveBiped.Bip01_L_Thigh",
- "ValveBiped.Bip01_R_Calf",
- "ValveBiped.Bip01_L_Calf",
- "ValveBiped.Bip01_R_Foot",
- "ValveBiped.Bip01_L_Foot",
- "ValveBiped.Bip01_R_Toe0",
- "ValveBiped.Bip01_L_Toe0",
- }
- for f, v in pairs(bonesToHide) do
- self.ModelToDraw:ManipulateBoneScale(self.ModelToDraw:LookupBone(v), Vector(0.000001, 0.000001, 0.000001))
- self.ModelToDraw:ManipulateBonePosition(self.ModelToDraw:LookupBone(v), Vector(0, 0, -30))
- end
- if self.ModelToDraw:LookupBone("ValveBiped.Bip01_Hips") then
- //self.ModelToDraw:ManipulateBonePosition(self.ModelToDraw:LookupBone("ValveBiped.Bip01_Hips"), Vector(0, 0, -30))
- end
- end
- self.ModelToDraw:SetParent(self)
- self.ModelToDraw:SetPos(self:GetPos())
- self.ModelToDraw:SetAngles(self:GetAngles())
- end
- print('setting')
- end
- end)
Advertisement
Add Comment
Please, Sign In to add comment