forked from Simnation/Main
ed
This commit is contained in:
parent
61b242396c
commit
05a77a6265
3 changed files with 8 additions and 24 deletions
|
@ -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()
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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
|
||||
}
|
||||
},
|
||||
|
||||
|
||||
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue