From bc41788cc9ad9548ef92400d2c0d1e7746b5af45 Mon Sep 17 00:00:00 2001 From: Andyyy7666 <86536434+Andyyy7666@users.noreply.github.com> Date: Mon, 18 Aug 2025 23:24:00 +0200 Subject: [PATCH] feat(client/peds): disable collision between models --- client/peds.lua | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/client/peds.lua b/client/peds.lua index c13861c..1a1b32e 100644 --- a/client/peds.lua +++ b/client/peds.lua @@ -101,6 +101,16 @@ local function updateBlips(playerGroups) end end +local function disableCollisionWithModels(ped, models) + local coords = GetEntityCoords(ped) + for i=1, #models do + local m = models[i] + local model = type(m) == "number" and m or GetHashKey(m) + local obj = GetClosestObjectOfType(coords.x, coords.y, coords.z, 5.0, model, false, false, false) + SetEntityNoCollisionEntity(ped, obj, false) + end +end + function NDCore.createAiPed(info) local ped local model = type(info.model) == "string" and GetHashKey(info.model) or info.model @@ -137,6 +147,7 @@ function NDCore.createAiPed(info) Wait(100) end + disableCollisionWithModels(ped, info.disableCollisionWithModels) configPed(ped) setClothing(ped, clothing) locations[id].ped = ped