Configurables
In this page, you can see everything that can be configured/changed within this script.
All of the code from frameworks, inventories & such are not displayed in here. This code is triggered within the fmLib dependency script. All of the dependencies code are also opensourced within fmLib.
Config
This is the config.lua from the default map variant of this script. The K4MB1 & Gabz variant config.lua looks the same, but have more doors configured etc.
--[[
BY CrimeM Š crimem.com
--]]
Config = {}
Config.DiscordWebhook = '' -- Discord webhook for logging, leave empty to disable
Config.ImgDirectory = 'ox_inventory/web/images/' -- Directory for images from your inventory script
Config.Locale = 'en'
Config.Cooldown = 60 * 60 * 1 -- Cooldown in seconds
Config.AlwaysLocked = true -- If true, the doors will be locked all the time, otherwise only when the robbery started
Config.ThermiteTime = 5000 -- Time in ms to burn the door after all animations are done
Config.C4Time = 5000 -- Time in ms to detonate the C4 after placement animations are done
Config.MinimumCops = { -- Minimum amount of cops required to start the robbery
jobs = { 'police', },
amount = 1,
}
Config.Start = {
door = {
model = -222270721,
coords = vector3(256.9607, 220.3147, 106.2852),
},
requiredItems = { -- Required items to start the robbery, when remove = true, the item(s) will be removed when the robbery starts
{ item = 'WEAPON_SWITCHBLADE', label = 'Switchblade', amount = 1, remove = false },
{ item = 'WEAPON_ASSAULTRIFLE', label = 'Assault Rifle', amount = 1, remove = false },
{ item = 'thermite_bomb', label = 'Thermite Bomb', amount = 4, remove = false },
{ item = 'c4_bomb', label = 'C4 Bomb', amount = 6, remove = false },
{ item = 'usb_stick', label = 'USB Stick', amount = 1, remove = false },
{ item = 'laptop', label = 'Laptop', amount = 1, remove = false },
{ item = 'drill', label = 'Drill', amount = 1, remove = false },
},
}
Config.Robbery = {
-- Loot under here is started when the robbery is started, we recommend putting the loot in the doors below, to prevent hackers to exploit.
-- Unless there is no specific door for the loot, the loot will be set in here
startLoot = {
trollies = {},
lockers = {},
paintings = {},
displays = {},
},
-- Loot is mostly setupped within the doors below, so it spawns when a door has been opened, in order to prevent hackers from exploiting.
lockedDoors = {
entranceDoor = {
action = 'thermite',
requiredItems = {
{ item = 'thermite_bomb', label = 'Thermite Bomb', amount = 1, remove = true },
},
scene = { -- Scene settings are required for thermite
coords = vector3(257.40, 220.20, 106.35),
rotation = vector3(0.0, 0.0, 336.48),
}
},
stairsDoor = {
action = 'thermite',
requiredItems = {
{ item = 'thermite_bomb', label = 'Thermite Bomb', amount = 1, remove = true },
},
scene = { -- Scene settings are required for thermite
coords = vector3(261.75, 221.420, 106.35),
rotation = vector3(0.0, 0.0, 255.48),
}
},
vaultDoor = {
action = 'thermite',
requiredItems = {
{ item = 'thermite_bomb', label = 'Thermite Bomb', amount = 1, remove = true },
},
scene = { -- Scene settings are required for thermite
coords = vector3(252.95, 220.70, 101.76),
rotation = vector3(0.0, 0.0, 160.0),
}
},
vaultDoor2 = {
action = 'thermite',
requiredItems = {
{ item = 'thermite_bomb', label = 'Thermite Bomb', amount = 1, remove = true },
},
scene = { -- Scene settings are required for thermite
coords = vector3(261.65, 215.60, 101.76),
rotation = vector3(0.0, 0.0, 252.0),
}
},
},
vaults = {
mainVault = {
action = 'laptop',
requiredItems = {
{ item = 'laptop', label = 'Laptop', amount = 1, remove = false },
},
lockers = {
{
coords = vector3(258.267, 213.848, 101.883),
rotation = vector3(0.0, 0.0, 160.0),
requiredItems = {
{ item = 'drill', label = 'Drill', amount = 1, remove = false },
},
rewards = {
money = { type = 'bank', min = 0, max = 5000 },
items = {
{ item = 'gold_bar', label = 'Gold Bar', min = 0, max = 2 },
}
}
},
{
coords = vector3(256.597, 214.445, 101.82),
rotation = vector3(0.0, 0.0, 160.0),
requiredItems = {
{ item = 'drill', label = 'Drill', amount = 1, remove = false },
},
rewards = {
money = { type = 'bank', min = 0, max = 5000 },
items = {
{ item = 'gold_bar', label = 'Gold Bar', min = 0, max = 2 },
}
}
},
{
coords = vector3(257.468, 214.128, 102.11),
rotation = vector3(0.0, 0.0, 160.0),
requiredItems = {
{ item = 'drill', label = 'Drill', amount = 1, remove = false },
},
rewards = {
money = { type = 'bank', min = 0, max = 5000 },
items = {
{ item = 'gold_bar', label = 'Gold Bar', min = 0, max = 2 },
}
}
},
{
coords = vector3(260.107, 213.167, 101.917),
rotation = vector3(0.0, 0.0, 160.0),
requiredItems = {
{ item = 'drill', label = 'Drill', amount = 1, remove = false },
},
rewards = {
money = { type = 'bank', min = 0, max = 5000 },
items = {
{ item = 'gold_bar', label = 'Gold Bar', min = 0, max = 2 },
}
}
},
{
coords = vector3(259.682, 218.327, 101.883),
rotation = vector3(0.0, 0.0, 350.0),
requiredItems = {
{ item = 'drill', label = 'Drill', amount = 1, remove = false },
},
rewards = {
money = { type = 'bank', min = 0, max = 5000 },
items = {
{ item = 'gold_bar', label = 'Gold Bar', min = 0, max = 2 },
}
}
},
{
coords = vector3(258.196, 218.858, 102.102),
rotation = vector3(0.0, 0.0, 350.0),
requiredItems = {
{ item = 'drill', label = 'Drill', amount = 1, remove = false },
},
rewards = {
money = { type = 'bank', min = 0, max = 5000 },
items = {
{ item = 'gold_bar', label = 'Gold Bar', min = 0, max = 2 },
}
}
},
{
coords = vector3(259.095, 218.53, 102.311),
rotation = vector3(0.0, 0.0, 350.0),
requiredItems = {
{ item = 'drill', label = 'Drill', amount = 1, remove = false },
},
rewards = {
money = { type = 'bank', min = 0, max = 5000 },
items = {
{ item = 'gold_bar', label = 'Gold Bar', min = 0, max = 2 },
}
}
},
{
coords = vector3(261.318, 217.721, 102.102),
rotation = vector3(0.0, 0.0, 350.0),
requiredItems = {
{ item = 'drill', label = 'Drill', amount = 1, remove = false },
},
rewards = {
money = { type = 'bank', min = 0, max = 5000 },
items = {
{ item = 'gold_bar', label = 'Gold Bar', min = 0, max = 2 },
}
}
},
{
coords = vector3(264.614, 216.522, 101.924),
rotation = vector3(0.0, 0.0, -21.0),
requiredItems = {
{ item = 'drill', label = 'Drill', amount = 1, remove = false },
},
rewards = {
money = { type = 'bank', min = 0, max = 5000 },
items = {
{ item = 'diamond', label = 'Diamond', min = 0, max = 2 },
}
}
},
{
coords = vector3(265.787, 216.095, 101.927),
rotation = vector3(0.0, 0.0, -21.0),
requiredItems = {
{ item = 'drill', label = 'Drill', amount = 1, remove = false },
},
rewards = {
money = { type = 'bank', min = 0, max = 5000 },
items = {
{ item = 'platinum_bar', label = 'Platinum Bar', min = 0, max = 2 },
}
}
},
{
coords = vector3(266.687, 214.321, 101.897),
rotation = vector3(0.0, 0.0, -111.0),
requiredItems = {
{ item = 'drill', label = 'Drill', amount = 1, remove = false },
},
rewards = {
money = { type = 'bank', min = 0, max = 5000 },
items = {
{ item = 'platinum_bar', label = 'Platinum Bar', min = 0, max = 2 },
}
}
},
{
coords = vector3(266.271, 213.177, 101.921),
rotation = vector3(0.0, 0.0, -111.0),
requiredItems = {
{ item = 'drill', label = 'Drill', amount = 1, remove = false },
},
rewards = {
money = { type = 'bank', min = 0, max = 5000 },
items = {
{ item = 'diamond', label = 'Diamond', min = 0, max = 2 },
}
}
},
{
coords = vector3(265.88, 212.104, 101.915),
rotation = vector3(0.0, 0.0, -111.0),
requiredItems = {
{ item = 'drill', label = 'Drill', amount = 1, remove = false },
},
rewards = {
money = { type = 'bank', min = 0, max = 5000 },
items = {
{ item = 'platinum_bar', label = 'Platinum Bar', min = 0, max = 2 },
}
}
},
{
coords = vector3(264.595, 211.534, 101.92),
rotation = vector3(0.0, 0.0, 160.0),
requiredItems = {
{ item = 'drill', label = 'Drill', amount = 1, remove = false },
},
rewards = {
money = { type = 'bank', min = 0, max = 5000 },
items = {
{ item = 'platinum_bar', label = 'Platinum Bar', min = 0, max = 2 },
}
}
},
{
coords = vector3(262.966, 212.126, 101.9),
rotation = vector3(0.0, 0.0, 160.0),
requiredItems = {
{ item = 'drill', label = 'Drill', amount = 1, remove = false },
},
rewards = {
money = { type = 'bank', min = 0, max = 5000 },
items = {
{ item = 'diamond', label = 'Diamond', min = 0, max = 2 },
}
}
},
},
stacks = { -- Stacks gets spawned when this door is opened
{
model = 'h4_prop_h4_cash_stack_01a',
coords = vector3(264.265, 213.735, 101.531),
heading = 250.0,
rewards = {
money = { type = 'bank', min = 10000, max = 25000 },
}
},
},
trollies = { -- Trollies gets spawned when this door is opened
{
model = 'ch_prop_ch_cash_trolly_01b',
coords = vector3(255.6992, 219.0216, 100.6833),
heading = 157.0,
rewards = {
money = { type = 'bank', min = 10000, max = 25000 },
}
},
{
model = 'ch_prop_gold_trolly_01a',
coords = vector3(254.8448, 216.0726, 100.6833),
heading = 340.0,
rewards = {
items = {
{ item = 'gold_bar', label = 'Gold Bar', min = 10, max = 25 },
}
}
},
{
model = 'ch_prop_diamond_trolly_01c',
coords = vector3(262.8153, 216.3135, 100.6833),
heading = 208.0,
rewards = {
items = {
{ item = 'diamond', label = 'Diamond', min = 10, max = 25 },
}
},
},
{
model = 'imp_prop_impexp_coke_trolly',
coords = vector3(261.8277, 213.0261, 100.6834),
heading = 307.3620,
rewards = {
items = {
{ item = 'platinum_bar', label = 'Platinum Bar', min = 10, max = 25 },
}
}
},
},
displays = {
{
glassCoords = vector3(252.4107, 215.8199, 100.6835), -- Coords for the glass
glassHeading = 30.0, -- Heading for the glass
valuables = { -- It takes a random valuable out of this list, if you always want it to be 1, just remove the others
{
model = 'h4_prop_h4_diamond_01a',
heading = -53.06, -- Heading for the valuable
displayRotation = vector3(360.0, 0.0, 70.0), -- Rotation for the display
rewards = {
items = {
{ item = 'ruby_diamond', label = 'Ruby Diamond', min = 1, max = 1 },
}
},
},
{
model = 'h4_prop_h4_necklace_01a',
heading = 340.06, -- Heading for the valuable
displayRotation = vector3(360.0, 0.0, 340.0), -- Rotation for the display
rewards = {
items = {
{ item = 'diamond_necklace', label = 'Diamond Necklace', min = 1, max = 1 },
}
},
},
},
requiredItems = {
{ item = 'WEAPON_SWITCHBLADE', label = 'Switchblade', amount = 1, remove = false },
},
},
{
glassCoords = vector3(249.1838, 216.9904, 100.6835), -- Coords for the glass
glassHeading = 30.0, -- Heading for the glass
valuables = { -- It takes a random valuable out of this list, if you always want it to be 1, just remove the others
{
model = 'h4_prop_h4_t_bottle_02a',
heading = 340.06,
rewards = {
items = {
{ item = 'antique_bottle', label = 'Antique Bottle', min = 1, max = 1 },
}
},
},
{
model = 'vw_prop_vw_pogo_gold_01a',
heading = 340.06,
rewards = {
items = {
{ item = 'gold_monkey', label = 'Gold Monkey', min = 1, max = 1 },
}
},
},
{
model = 'h4_prop_h4_art_pant_01a',
heading = -53.06,
rewards = {
items = {
{ item = 'lapis_panther', label = 'Lapis Panther', min = 1, max = 1 },
}
},
},
},
requiredItems = {
{ item = 'WEAPON_SWITCHBLADE', label = 'Switchblade', amount = 1, remove = false },
},
}
},
paintings = {
{
model = 'h4_prop_h4_painting_01f',
coords = vector3(248.75, 219.557, 101.683),
heading = 70.85,
requiredItems = {
{ item = 'WEAPON_SWITCHBLADE', label = 'Switchblade', amount = 1, remove = false },
},
rewards = {
items = {
{ item = 'rembrandt', label = 'Rembrandt', min = 1, max = 1 },
}
},
scene = {
coords = vector3(249.21, 219.417, 101.493),
rotation = vector3(0.0, 0.0, 70.0),
}
},
}
}
},
laserZones = { -- Uses mka_lasers
{
deactivate = vector3(244.3508, 230.5322, 106.2162),
lasers = { -- Only change these lasers if you have experience setting it up with mka_lasers
{
vector3(251.626, 225.372, 104.628),
{ vector3(257.451, 228.145, 100.683), vector3(260.808, 227.235, 100.683), vector3(263.425, 225.924, 100.683), vector3(264.46, 223.304, 101.956), vector3(261.635, 223.514, 100.683), vector3(256.143, 224.341, 100.876), vector3(254.045, 228.102, 100.683), vector3(255.795, 228.191, 100.683) },
{ travelTimeBetweenTargets = { 1.5, 1.5 }, waitTimeAtTargets = { 0.0, 0.0 }, randomTargetSelection = false, name = "bank_laser_1" }
},
{
vector3(270.217, 223.941, 108.423),
{ vector3(264.794, 225.642, 100.683), vector3(264.016, 223.831, 100.683), vector3(269.726, 223.646, 102.483), vector3(265.946, 218.181, 103.883), vector3(266.952, 221.147, 103.283), vector3(263.356, 221.915, 100.683) },
{ travelTimeBetweenTargets = { 1.0, 1.0 }, waitTimeAtTargets = { 0.0, 0.0 }, randomTargetSelection = falseAS, name = "bank_laser_1" }
},
}
},
},
cameras = { -- Viewable cameras when the robbery is started
enabled = true,
open = {
everyone = false, -- If true, everyone can view the cameras, otherwise only the jobs below
jobs = { 'police', },
coords = vector3(256.8093, 230.9108, 152.0328),
rotation = vector3(0.0, 0.0, 158.0),
},
cams = {
-- Default Bank Cams
{ x = 232.86, y = 221.46, z = 107.83, r = { x = -25.0, y = 0.0, z = -140.91 } },
{ x = 257.45, y = 210.07, z = 109.08, r = { x = -25.0, y = 0.0, z = 28.05 } },
{ x = 261.50, y = 218.08, z = 107.95, r = { x = -25.0, y = 0.0, z = -149.49 } },
{ x = 241.64, y = 233.83, z = 111.48, r = { x = -35.0, y = 0.0, z = 120.46 } },
{ x = 269.66, y = 223.67, z = 113.23, r = { x = -30.0, y = 0.0, z = 111.29 } },
{ x = 261.98, y = 217.92, z = 113.25, r = { x = -40.0, y = 0.0, z = -159.49 } },
{ x = 258.44, y = 204.97, z = 113.25, r = { x = -30.0, y = 0.0, z = 10.50 } },
{ x = 235.53, y = 227.37, z = 113.23, r = { x = -35.0, y = 0.0, z = -160.29 } },
{ x = 254.72, y = 206.06, z = 113.28, r = { x = -35.0, y = 0.0, z = 44.70 } },
{ x = 269.89, y = 223.76, z = 106.48, r = { x = -35.0, y = 0.0, z = 112.62 } },
{ x = 252.27, y = 225.52, z = 103.99, r = { x = -35.0, y = 0.0, z = -74.87 } },
}
}
}
Config.Selling = {
enabled = true,
coords = vector3(2328.1243, 2569.9614, 45.6769),
npcModel = 'u_m_m_aldinapoli',
heading = 326.8159,
moneyType = 'bank',
items = { -- Items that can be sold
['lapis_panther'] = { label = 'Lapis Panther', price = 50000 }, -- Price is per 1
['ruby_diamond'] = { label = 'Ruby Diamond', price = 45000 },
['diamond_necklace'] = { label = 'Diamond Necklace', price = 40000 },
['antique_bottle'] = { label = 'Antique Bottle', price = 35000 },
['gold_monkey'] = { label = 'Gold Monkey', price = 30000 },
['rembrandt'] = { label = 'Rembrandt', price = 25000 },
['diamond'] = { label = 'Diamond', price = 1000 },
['platinum_bar'] = { label = 'Platinum Bar', price = 800 },
['gold_bar'] = { label = 'Gold Bar', price = 500 },
}
}
Config.CopsNotifications = {
jobs = { 'police', },
onRobbertyStart = 'Pacific Bank is being robbed! Hurry!', -- put to false to disable (onRobbertyStart = false,)
}
--[[
ONLY CHANGE THIS PART IF YOU HAVE RENAMED SCRIPTS SUCH AS FRAMEWORK, TARGET, INVENTORY ETC
RENAME THE SCRIPT NAME TO THE NEW NAME
--]]
---@type table Only change these if you have changed the name of a resource
Resources = {
FM = { name = 'fmLib', export = 'new' },
OXTarget = { name = 'ox_target', export = 'all' },
QBTarget = { name = 'qb-target', export = 'all' },
MKALasers = { name = 'mka-lasers', export = false },
}
IgnoreScriptFoundLogs = false
Opensource Code
--[[
BY CrimeM Š crimem.com
--]]
function InitStartDoorTarget(obj)
if OXTarget then
OXTarget:addLocalEntity(obj, {
{
name = 'startRobbery', -- Do not change the name
label = 'Start Robbery',
icon = 'fas fa-gun',
distance = 2.5,
canInteract = function()
return GlobalState[State.ROBBERYSTATUS] == Status.NOTSTARTED
end,
onSelect = function()
TriggerServerEvent(_E('startRobbery'))
end
}
})
TargetEntities[obj] = 'startRobbery'
elseif QBTarget then
QBTarget:AddTargetEntity(obj, {
options = {
{
label = 'Start Robbery',
icon = 'fas fa-gun',
targeticon = 'fas fa-gun',
action = function()
TriggerServerEvent(_E('startRobbery'))
end,
canInteract = function()
return GlobalState[State.ROBBERYSTATUS] == Status.NOTSTARTED
end,
},
},
distance = 2.5,
})
TargetEntities[obj] = 'Start Robbery'
end
end
function InitSellingTarget(npc)
if OXTarget then
OXTarget:addLocalEntity(npc, {
{
label = 'Sell Loot',
icon = 'fas fa-dollar-sign',
distance = 2.5,
onSelect = function()
OpenSellingNPC()
end
}
})
elseif QBTarget then
QBTarget:AddTargetEntity(npc, {
options = {
{
label = 'Sell Loot',
icon = 'fas fa-dollar-sign',
targeticon = 'fas fa-dollar-sign',
action = function()
OpenSellingNPC()
end,
},
},
distance = 2.5,
})
end
end
function InitLaserDeactivationTarget(lZoneKey)
local zone = LaserZones[lZoneKey]
if not zone then Error('Laser zone not found with key: ' .. lZoneKey) return end
if OXTarget then
TargetZones[#TargetZones+1] = OXTarget:addSphereZone({
coords = zone.deactivate,
radius = 1.0,
debug = false,
drawSprite = true,
options = {
{
label = 'Deactivate Lasers',
icon = 'fas fa-power-off',
distance = 2.5,
canInteract = function()
return not DoingAction and not zone.deactivated
end,
onSelect = function()
DoingAction = true
if DisableLasersMinigame() then
TriggerServerEvent(_E('server:deactivateLaserZone'), lZoneKey)
end
DoingAction = false
end
}
}
})
elseif QBTarget then
local name = 'laser_deactivation'
TargetZones[#TargetZones+1] = name
QBTarget:AddCircleZone(name, zone.deactivate, 1.0, {
name = name,
debugPoly = false,
}, {
options = {
{
label = 'Deactivate Lasers',
icon = 'fas fa-power-off',
targeticon = 'fas fa-power-off',
action = function()
DoingAction = true
if DisableLasersMinigame() then
TriggerServerEvent(_E('server:deactivateLaserZone'), lZoneKey)
end
DoingAction = false
end,
canInteract = function()
return not DoingAction and not zone.deactivated
end
}
},
distance = 2.5,
})
end
end
function InitOpenCamerasTarget()
local openCam = Config.Robbery.cameras.open
if OXTarget then
TargetZones[#TargetZones+1] = OXTarget:addSphereZone({
coords = openCam.coords,
radius = 1.0,
debug = false,
drawSprite = true,
options = {
{
label = 'View Cameras',
icon = 'fas fa-video',
distance = 2.5,
canInteract = function()
return not DoingAction
end,
onSelect = function()
OpenCameras()
end
}
}
})
elseif QBTarget then
local name = 'open_cameras'
TargetZones[#TargetZones+1] = name
QBTarget:AddCircleZone(name, openCam.coords, 1.0, {
name = name,
debugPoly = false,
}, {
options = {
{
label = 'View Cameras',
icon = 'fas fa-video',
targeticon = 'fas fa-video',
action = function()
OpenCameras()
end,
canInteract = function()
return not DoingAction
end
}
},
distance = 2.5,
})
end
end
function InitLockedDoorTarget(obj, i, label, icon)
local door = Doors[i]
if not door then Error('Door not found with index: ' .. i) return end
if OXTarget then
OXTarget:addLocalEntity(obj, {
{
name = 'door', -- Do not change the name
label = label,
icon = icon,
distance = 2.5,
canInteract = function()
return InRobbery and not DoingAction and door.locked
end,
onSelect = function()
OpenDoor(i)
end
}
})
TargetEntities[obj] = 'door'
elseif QBTarget then
QBTarget:AddTargetEntity(obj, {
options = {
{
label = label,
icon = icon,
targeticon = icon,
action = function()
OpenDoor(i)
end,
canInteract = function()
return InRobbery and not DoingAction and door.locked
end,
},
},
distance = 2.5,
})
TargetEntities[obj] = label
end
end
---@param type 'trolly' | 'stack' | 'painting' | 'display' | 'locker'
function InitLootTarget(type, obj, i, label)
local loot = GetLootByTypeAndIndex(type, i)
if OXTarget then
local options = {
{
name = type, -- Do not change the name
label = label,
icon = 'fas fa-hand',
distance = 2.5,
canInteract = function()
return not DoingAction and not loot.taken
end,
onSelect = function()
GrabLoot(type, i)
end
}
}
if type == 'stack' or type == 'locker' then
TargetZones[#TargetZones+1] = OXTarget:addSphereZone({
coords = loot.coords,
radius = type == 'stack' and 0.5 or 0.2,
debug = false,
drawSprite = true,
options = options
})
else
OXTarget:addLocalEntity(obj, options)
TargetEntities[obj] = type
end
elseif QBTarget then
local options = {
{
label = label,
icon = 'fas fa-hand',
targeticon = 'fas fa-hand',
action = function()
GrabLoot(type, i)
end,
canInteract = function()
return not DoingAction and not loot.taken
end
}
}
if type == 'stack' or type == 'locker' then
local name = type..tostring(i)
TargetZones[#TargetZones+1] = name
QBTarget:AddCircleZone(name, loot.coords, type == 'stack' and 0.5 or 0.2, {
name = name,
debugPoly = false,
}, {
options = options,
distance = 2.5,
})
else
QBTarget:AddTargetEntity(obj, {
options = options,
distance = 2.5,
})
TargetEntities[obj] = label
end
end
end
-- must return true or false
function DisableLasersMinigame()
if GetResourceState('utk_fingerprint') ~= 'started' or GetResourceState('utk_hackdependency') ~= 'started' then
return MinigameNotFoundFallback({ 'utk_fingerprint', 'utk_hackdependency' })
end
local res = promise.new()
TriggerEvent("utk_fingerprint:Start", 2, 4, 2, function(outcome, reason)
res:resolve(outcome)
end)
return Citizen.Await(res)
end
-- must return true or false
function USBHackMinigame()
if GetResourceState('ultra-keypackhack') ~= 'started' then
return MinigameNotFoundFallback({ 'ultra-keypackhack' })
end
local res = promise.new()
TriggerEvent('ultra-keypadhack', 6, 120, function(outcome, reason)
if outcome == 1 then
res:resolve(true)
else
res:resolve(false)
end
end)
return Citizen.Await(res)
end
-- must return true or false
function LaptopHackMinigame()
if GetResourceState('ultra-keypackhack') ~= 'started' then
return MinigameNotFoundFallback({ 'ultra-keypackhack' })
end
local res = promise.new()
TriggerEvent('ultra-keypadhack', 6, 120, function(outcome, reason)
if outcome == 1 then
res:resolve(true)
else
res:resolve(false)
end
end)
return Citizen.Await(res)
end
-- must return true or false
function DrillingMinigame()
if GetResourceState('fivem-drilling') ~= 'started' or GetResourceState('meta_libs') ~= 'started' then
return MinigameNotFoundFallback({ 'fivem-drilling', 'meta_libs' })
end
local res = promise.new()
TriggerEvent("Drilling:Start",function(success)
res:resolve(success)
end)
return Citizen.Await(res)
end
function OnPlayerLaserHit(playerBeingHit, hitPos)
if playerBeingHit then
StartScreenEffect('DeathFailNeutralIn', 0, false)
ApplyDamageToPed(PlayerPedId(), 20, true)
else
StopScreenEffect('DeathFailNeutralIn')
end
end
RegisterNetEvent(_E('notifyCops'), function(coords, msg)
local blip = AddBlipForCoord(coords.x, coords.y, coords.z)
SetBlipSprite(blip, 161)
SetBlipScale(blip, 1.0)
SetBlipColour(blip, 1)
SetBlipAsShortRange(blip, false)
BeginTextCommandSetBlipName("STRING")
AddTextComponentString('Suspicious activity')
EndTextCommandSetBlipName(blip)
FM.utils.notify(msg, 'error')
Wait(20000)
RemoveBlip(blip)
end)
--[[
BY CrimeM Š crimem.com
--]]
--[[
These events can be used to integrate other scripts etc.
If you register these events in other scripts make sure to change GetCurrentResourceName() to the name of this script.
Example: GetCurrentResourceName()..':onRobberyStarted' -> 'cm_pacificrobbery_k4:onRobberyStarted'
--]]
RegisterNetEvent(GetCurrentResourceName()..':onRobberyStarted', function(playerId)
-- Code here
end)
RegisterNetEvent(GetCurrentResourceName()..':onRobberyEnded', function(success, reason)
-- Code here
end)
RegisterNetEvent(GetCurrentResourceName()..':onLootTaken', function(playerId, type, loot)
-- Code here
end)
RegisterNetEvent(GetCurrentResourceName()..':onDoorOpened', function(playerId, door)
-- Code here
end)
RegisterNetEvent(GetCurrentResourceName()..':onLaserZoneDeactivated', function(playerId, laserZone)
-- Code here
end)
Last updated