General > Developers Corner

Prop Hunt server Prop hit boxes not registering

(1/1)

DJX:
So I have a dedicated gmod server running prop hunt with a small issue with the hit boxes. When players have a playermodel on from the pointshop, it throws off the hit box to where when a prop gets shot directly, it takes no damage but when the player model is removed, damage is taken normally again. Is there a way to make it so that either the point shop removes player models from props or to edit the hit boxes? I tried this code in point shop but it didn't help.


--- Code: ---ITEM.Name = 'Buzz Lightyear'
ITEM.Price = 35000
ITEM.Model = 'models/code_gs/buzz/buzzplayer.mdl'

function ITEM:OnEquip(ply, modifications)
if ply:Team() == TEAM_HUNTERS then
if not ply._OldModel then
ply._OldModel = ply:GetModel()
end
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)
if ply:Team() == TEAM_HUNTERS then
ply:SetModel(self.Model)
end
end

--- End code ---
Any help is appreciated!

Navigation

[0] Message Index

Go to full version