From c08d815891073419da1c2becc2c8790d83ab0ce1 Mon Sep 17 00:00:00 2001 From: Niko <124378025+happy1063@users.noreply.github.com> Date: Sun, 11 May 2025 15:05:45 +0300 Subject: [PATCH] Create sticky_slam.txt --- sticky_slam.txt | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) create mode 100644 sticky_slam.txt diff --git a/sticky_slam.txt b/sticky_slam.txt new file mode 100644 index 0000000..9b5749f --- /dev/null +++ b/sticky_slam.txt @@ -0,0 +1,18 @@ +--@name sticky_slam +--@author Niko +--@server + +hook.add("OnEntityCreated", "", function(ent) + if ent and ent:isValid() then + if ent:getOwner() == owner() and ent:getClass() == "npc_satchel" then + ent:addCollisionListener(function(colData,collider) + ent:setAngles((colData.HitNormal):getAngle()-Angle(90,0,0)) + ent:setFrozen(true) + + if colData.HitEntity and colData.HitEntity:isValid() then + ent:setParent(colData.HitEntity) + end + end) + end + end +end)