So recently i have noticed that when picking up players with the physgun they jitter around a lot and often die too.
This never happened before and no changes were made by me in my server that would affect it.
Upon further investigation i found that my PhysgunPickup function was working fine, this is where i have it set players movetype to noclip so they can be moved around freely.
Except from one thing. PhysgunPickup is now only being called when picking up a non-player entity. If you pickup a player it doesn’t run.
Here is some code of my PhysgunPickup function:
(i have tried using as a GM function too but this has the same issue, i also tried with and without hooks.)
function PLUGIN.PhysgunPickup( PLAYER, ENTITY ) if PLAYER:IsAdmin() then if string.find(tostring(ENTITY), "door") then return false elseif string.find(tostring(ENTITY), "prop_physics") then return true elseif string.find(tostring(ENTITY), "npc") then return true elseif ENTITY:IsPlayer() then if ENTITY != PLAYER then if ENTITY:IsBetterOrSame(PLAYER) then return false end end ENTITY:Freeze(true) ENTITY:SetMoveType(MOVETYPE_NOCLIP) return true elseif ENTITY:IsVehicle() and PLAYER:IsSuperAdmin() then return true end end end hook.Add( "PhysgunPickup", "PhysgunPickup", PLUGIN.PhysgunPickup )