From 05a77a626576d87a22bc369cda4f5829f3433593 Mon Sep 17 00:00:00 2001 From: Nordi98 Date: Sun, 20 Jul 2025 19:57:23 +0200 Subject: [PATCH] ed --- .../nordi_containerheist/client/main.lua | 8 +++++-- .../nordi_containerheist/server/main.lua | 1 + resources/[tools]/bzzz_spawnped/config.lua | 23 +------------------ 3 files changed, 8 insertions(+), 24 deletions(-) diff --git a/resources/[jobs]/[crime]/nordi_containerheist/client/main.lua b/resources/[jobs]/[crime]/nordi_containerheist/client/main.lua index d974edcb2..d94dba68b 100644 --- a/resources/[jobs]/[crime]/nordi_containerheist/client/main.lua +++ b/resources/[jobs]/[crime]/nordi_containerheist/client/main.lua @@ -158,8 +158,11 @@ local function StartContainerRobbery(container, containerType) return end + -- Generate a unique ID for this container robbery + local containerID = "container_" .. math.random(100000, 999999) + -- Check cooldowns - local cooldownCheck = lib.callback.await('container_heist:server:checkCooldown', false, NetworkGetNetworkIdFromEntity(container)) + local cooldownCheck = lib.callback.await('container_heist:server:checkCooldown', false, containerID) if not cooldownCheck.success then lib.notify({ title = Config.Notifications.title, @@ -215,7 +218,7 @@ local function StartContainerRobbery(container, containerType) }, }) then -- Success - TriggerServerEvent('container_heist:server:finishRobbery', NetworkGetNetworkIdFromEntity(container), containerType.type) + TriggerServerEvent('container_heist:server:finishRobbery', containerID, containerType.type) lib.notify({ title = Config.Notifications.title, description = Config.Notifications.success, @@ -234,6 +237,7 @@ local function StartContainerRobbery(container, containerType) currentContainer = nil end + -- Function to scan and add all nearby containers to target system local function ScanAndAddContainersToTarget() local playerPed = PlayerPedId() diff --git a/resources/[jobs]/[crime]/nordi_containerheist/server/main.lua b/resources/[jobs]/[crime]/nordi_containerheist/server/main.lua index a908ced54..997cedf2a 100644 --- a/resources/[jobs]/[crime]/nordi_containerheist/server/main.lua +++ b/resources/[jobs]/[crime]/nordi_containerheist/server/main.lua @@ -52,6 +52,7 @@ lib.callback.register('container_heist:server:checkCooldown', function(source, c return {success = true} end) + -- Get police count lib.callback.register('container_heist:server:getPoliceCount', function() local policeCount = 0 diff --git a/resources/[tools]/bzzz_spawnped/config.lua b/resources/[tools]/bzzz_spawnped/config.lua index 7305562d8..aee4c75a9 100644 --- a/resources/[tools]/bzzz_spawnped/config.lua +++ b/resources/[tools]/bzzz_spawnped/config.lua @@ -88,28 +88,7 @@ Config = { BlockingOfNonTemporaryEvents = true } }, - { - pedHash = `S_M_M_DockWork_01`, - pedCoords = vector4(1243.1014, -3196.8843, 6.0282, 271.5252), - pedAnimation = { - animDict = 'amb@world_human_stand_tablet@male@base', -- Male version - animName = 'base', - animFlag = 49 - }, - pedProp = { - propHash = `prop_cs_tablet`, - propBone = 28422, - propPlacement = { - 0.17, 0.07, -0.15, - 10.0, -100.0, 0.0 - } - }, - pedSettings = { - FreezePerson = true, - Invincible = true, - BlockingOfNonTemporaryEvents = true - } - }, + }