Hello,
You have to trigger the export in the file/script that you want. Assuming you are using qb-banckrobbery, open client/fleeca.lua and scroll down to:
RegisterNetEvent('qb-bankrobbery:client:robberyCall', function(type, key, streetLabel, coords)
you have two options here:
- Comment the whole event and replace them with your exports
- Alter the code to match (can be tricky if you are not well accomodated with LUA yet)
So, going with option 1 you will have something similar to:
RegisterNetEvent('qb-bankrobbery:client:ResetFleecaLockers', function(BankId)
Config.SmallBanks[BankId]["isOpened"] = false
for k in pairs(Config.SmallBanks[BankId]["lockers"]) do
Config.SmallBanks[BankId]["lockers"][k]["isOpened"] = false
Config.SmallBanks[BankId]["lockers"][k]["isBusy"] = false
end
end)
exports['qb-dispatch']:FleecaBankRobbery(camId)
--[[
RegisterNetEvent('qb-bankrobbery:client:robberyCall', function(type, key, streetLabel, coords)
if not isLoggedIn then return end
local PlayerJob = QBCore.Functions.GetPlayerData().job
if PlayerJob.name == "police" and PlayerJob.onduty then
local cameraId
local bank
if type == "small" then
cameraId = Config.SmallBanks[key]["camId"]
bank = "Fleeca"
PlaySound(-1, "Lose_1st", "GTAO_FM_Events_Soundset", 0, 0, 1)
TriggerEvent('qb-policealerts:client:AddPoliceAlert', {
timeOut = 10000,
alertTitle = Lang:t('alerts.polFleca'),
coords = {
x = coords.x,
y = coords.y,
z = coords.z,
},
details = {
[1] = {
icon = '<i class="fas fa-university"></i>',
detail = bank,
},
[2] = {
icon = '<i class="fas fa-video"></i>',
detail = cameraId,
},
[3] = {
icon = '<i class="fas fa-globe-europe"></i>',
detail = streetLabel,
},
},
callSign = QBCore.Functions.GetPlayerData().metadata["callsign"],
})
elseif type == "paleto" then
cameraId = Config.BigBanks["paleto"]["camId"]
bank = "Blaine County Savings"
PlaySound(-1, "Lose_1st", "GTAO_FM_Events_Soundset", 0, 0, 1)
Wait(100)
PlaySoundFrontend( -1, "Beep_Red", "DLC_HEIST_HACKING_SNAKE_SOUNDS", 1 )
Wait(100)
PlaySound(-1, "Lose_1st", "GTAO_FM_Events_Soundset", 0, 0, 1)
Wait(100)
PlaySoundFrontend( -1, "Beep_Red", "DLC_HEIST_HACKING_SNAKE_SOUNDS", 1 )
TriggerEvent('qb-policealerts:client:AddPoliceAlert', {
timeOut = 10000,
alertTitle = Lang:t('alerts.polBCounty'),
coords = {
x = coords.x,
y = coords.y,
z = coords.z,
},
details = {
[1] = {
icon = '<i class="fas fa-university"></i>',
detail = bank,
},
[2] = {
icon = '<i class="fas fa-video"></i>',
detail = cameraId,
},
},
callSign = QBCore.Functions.GetPlayerData().metadata["callsign"],
})
elseif type == "pacific" then
bank = "Pacific Standard Bank"
PlaySound(-1, "Lose_1st", "GTAO_FM_Events_Soundset", 0, 0, 1)
Wait(100)
PlaySoundFrontend( -1, "Beep_Red", "DLC_HEIST_HACKING_SNAKE_SOUNDS", 1 )
Wait(100)
PlaySound(-1, "Lose_1st", "GTAO_FM_Events_Soundset", 0, 0, 1)
Wait(100)
PlaySoundFrontend( -1, "Beep_Red", "DLC_HEIST_HACKING_SNAKE_SOUNDS", 1 )
TriggerEvent('qb-policealerts:client:AddPoliceAlert', {
timeOut = 10000,
alertTitle = Lang:t('alerts.polPStandard'),
coords = {
x = coords.x,
y = coords.y,
z = coords.z,
},
details = {
[1] = {
icon = '<i class="fas fa-university"></i>',
detail = bank,
},
[2] = {
icon = '<i class="fas fa-video"></i>',
detail = "1 | 2 | 3",
},
[3] = {
icon = '<i class="fas fa-globe-europe"></i>',
detail = "Alta St",
},
},
callSign = QBCore.Functions.GetPlayerData().metadata["callsign"],
})
end
local transG = 250
local blip = AddBlipForCoord(coords.x, coords.y, coords.z)
SetBlipSprite(blip, 487)
SetBlipColour(blip, 4)
SetBlipDisplay(blip, 4)
SetBlipAlpha(blip, transG)
SetBlipScale(blip, 1.2)
SetBlipFlashes(blip, true)
BeginTextCommandSetBlipName('STRING')
AddTextComponentString(Lang:t('mblips.code'))
EndTextCommandSetBlipName(blip)
while transG ~= 0 do
Wait(180 * 4)
transG = transG - 1
SetBlipAlpha(blip, transG)
if transG == 0 then
SetBlipSprite(blip, 2)
RemoveBlip(blip)
return
end
end
end
end)
]]--