yes I do but for some reason it still dosent open it
men, read the documentation PLS
local rob = false
local robbers = {}
ESX = nil
TriggerEvent(âesx:getSharedObjectâ, function(obj) ESX = obj end)
function get3DDistance(x1, y1, z1, x2, y2, z2)
return math.sqrt(math.pow(x1 - x2, 2) + math.pow(y1 - y2, 2) + math.pow(z1 - z2, 2))
end
RegisterServerEvent(âesx_holdupbank:toofarâ)
AddEventHandler(âesx_holdupbank:toofarâ, function(robb)
local source = source
local xPlayers = ESX.GetPlayers()
rob = false
for i=1, #xPlayers, 1 do
local xPlayer = ESX.GetPlayerFromId(xPlayers[i])
if xPlayer.job.name == âpoliceâ then
TriggerClientEvent(âesx:showNotificationâ, xPlayers[i], _U(ârobbery_cancelled_atâ) ⌠Banks[robb].nameofbank)
TriggerClientEvent(âesx_holdupbank:killblipâ, xPlayers[i])
end
end
if(robbers[source])then
TriggerClientEvent(âesx_holdupbank:toofarlocalâ, source)
robbers[source] = nil
TriggerClientEvent(âesx:showNotificationâ, source, _U(ârobbery_has_cancelledâ) ⌠Banks[robb].nameofbank)
end
end)
RegisterServerEvent(âesx_holdupbank:toofarhackâ)
AddEventHandler(âesx_holdupbank:toofarhackâ, function(robb)
local source = source
local xPlayers = ESX.GetPlayers()
rob = false
for i=1, #xPlayers, 1 do
local xPlayer = ESX.GetPlayerFromId(xPlayers[i])
if xPlayer.job.name == âpoliceâ then
TriggerClientEvent(âesx:showNotificationâ, xPlayers[i], _U(ârobbery_cancelled_atâ) ⌠Banks[robb].nameofbank)
TriggerClientEvent(âesx_holdupbank:killblipâ, xPlayers[i])
end
end
if(robbers[source])then
TriggerClientEvent(âesx_holdupbank:toofarlocalâ, source)
robbers[source] = nil
TriggerClientEvent(âesx:showNotificationâ, source, _U(ârobbery_has_cancelledâ) ⌠Banks[robb].nameofbank)
end
end)
RegisterServerEvent(âesx_holdupbank:robâ)
AddEventHandler(âesx_holdupbank:robâ, function(robb)
local source = source
local xPlayer = ESX.GetPlayerFromId(source)
local xPlayers = ESX.GetPlayers()
if Banks[robb] then
local bank = Banks[robb]
if (os.time() - bank.lastrobbed) < 600 and bank.lastrobbed ~= 0 then
TriggerClientEvent('esx:showNotification', source, _U('already_robbed') .. (1800 - (os.time() - bank.lastrobbed)) .. _U('seconds'))
return
end
local cops = 0
for i=1, #xPlayers, 1 do
local xPlayer = ESX.GetPlayerFromId(xPlayers[i])
if xPlayer.job.name == 'police' then
cops = cops + 1
end
end
if rob == false then
if xPlayer.getInventoryItem('blowtorch').count >= 1 then
xPlayer.removeInventoryItem('blowtorch', 1)
if(cops >= Config.NumberOfCopsRequired)then
rob = true
for i=1, #xPlayers, 1 do
local xPlayer = ESX.GetPlayerFromId(xPlayers[i])
if xPlayer.job.name == 'police' then
TriggerClientEvent('chatMessage', -1, 'NEWS', {255, 0, 0}, "Robbery in progress at ^2" .. bank.nameofbank)
TriggerClientEvent('esx:showNotification', xPlayers[i], _U('rob_in_prog') .. bank.nameofbank)
TriggerClientEvent('esx_holdupbank:killblip', xPlayers[i])
TriggerClientEvent('esx_holdupbank:setblip', xPlayers[i], Banks[robb].position)
end
end
TriggerClientEvent('esx:showNotification', source, _U('started_to_rob') .. bank.nameofbank .. _U('do_not_move'))
TriggerClientEvent('esx:showNotification', source, _U('alarm_triggered'))
TriggerClientEvent('esx:showNotification', source, _U('hold_pos'))
TriggerClientEvent('esx_holdupbank:currentlyrobbing', source, robb)
TriggerClientEvent('esx_blowtorch:startblowtorch', source)
Banks[robb].lastrobbed = os.time()
robbers[source] = robb
local savedSource = source
SetTimeout(300000, function()
if(robbers[savedSource])then
rob = false
TriggerClientEvent('esx_holdupbank:robberycomplete', savedSource, job)
if(xPlayer)then
--Updated to choose between cash or black money
if Config.moneyType == 'cash' then
xPlayer.addMoney(bank.reward)
elseif Config.moneyType == 'black' then
xPlayer.addAccountMoney('black_money',bank.reward)
end
local xPlayers = ESX.GetPlayers()
for i=1, #xPlayers, 1 do
local xPlayer = ESX.GetPlayerFromId(xPlayers[i])
if xPlayer.job.name == 'police' then
TriggerClientEvent('esx:showNotification', xPlayers[i], _U('robbery_complete_at') .. bank.nameofbank)
TriggerClientEvent('esx_holdupbank:killblip', xPlayers[i])
end
end
end
end
end)
else
TriggerClientEvent('esx:showNotification', source, _U('min_two_police')..Config.NumberOfCopsRequired)
end
else
TriggerClientEvent('esx:showNotification', source, _U('blowtorch_needed'))
end
else
TriggerClientEvent('esx:showNotification', source, _U('robbery_already'))
end
end
end)
RegisterServerEvent(âesx_holdupbank:hackâ)
AddEventHandler(âesx_holdupbank:hackâ, function(robb)
local source = source
local xPlayer = ESX.GetPlayerFromId(source)
local xPlayers = ESX.GetPlayers()
if Banks[robb] then
local bank = Banks[robb]
if (os.time() - bank.lastrobbed) < 600 and bank.lastrobbed ~= 0 then
TriggerClientEvent('esx:showNotification', source, _U('already_robbed') .. (1800 - (os.time() - bank.lastrobbed)) .. _U('seconds'))
return
end
local cops = 0
for i=1, #xPlayers, 1 do
local xPlayer = ESX.GetPlayerFromId(xPlayers[i])
if xPlayer.job.name == 'police' then
cops = cops + 1
end
end
if(cops >= Config.NumberOfCopsRequired)then
if xPlayer.getInventoryItem('raspberry').count >= 1 then
xPlayer.removeInventoryItem('raspberry', 1)
TriggerClientEvent('esx:showNotification', source, _U('started_to_hack') .. bank.nameofbank .. _U('do_not_move'))
TriggerClientEvent('esx:showNotification', source, _U('hold_pos_hack'))
TriggerClientEvent('esx_holdupbank:currentlyhacking', source, robb, Banks[robb])
else
TriggerClientEvent('esx:showNotification', source, _U('raspberry_needed'))
end
else
TriggerClientEvent('esx:showNotification', source, _U('min_two_police'))
end
end
end)
â Plant a bomb
RegisterServerEvent(âesx_holdupbank:plantbombâ)
AddEventHandler(âesx_holdupbank:plantbombâ, function(robb)
local source = source
local xPlayer = ESX.GetPlayerFromId(source)
local xPlayers = ESX.GetPlayers()
if Banks[robb] then
local bank = Banks[robb]
if (os.time() - bank.lastrobbed) < 600 and bank.lastrobbed ~= 0 then
TriggerClientEvent('esx:showNotification', source, _U('already_robbed') .. (1800 - (os.time() - bank.lastrobbed)) .. _U('seconds'))
return
end
local cops = 0
for i=1, #xPlayers, 1 do
local xPlayer = ESX.GetPlayerFromId(xPlayers[i])
if xPlayer.job.name == 'police' then
cops = cops + 1
end
end
if(cops >= Config.NumberOfCopsRequired)then
if xPlayer.getInventoryItem('c4_bank').count >= 1 then
xPlayer.removeInventoryItem('c4_bank', 1)
for i=1, #xPlayers, 1 do
local xPlayer = ESX.GetPlayerFromId(xPlayers[i])
if xPlayer.job.name == 'police' then
TriggerClientEvent('chatMessage', -1, 'NEWS', {255, 0, 0}, "Robbery in progress at ^2" .. bank.nameofbank)
TriggerClientEvent('esx:showNotification', xPlayers[i], _U('rob_in_prog') .. bank.nameofbank)
TriggerClientEvent('esx_holdupbank:setblip', xPlayers[i], Banks[robb].position)
end
end
TriggerClientEvent('esx:showNotification', source, _U('started_to_plantbomb') .. bank.nameofbank .. _U('do_not_move'))
TriggerClientEvent('esx:showNotification', source, _U('hold_pos_plantbomb'))
TriggerClientEvent('esx_holdupbank:plantingbomb', source, robb, Banks[robb])
robbers[source] = robb
local savedSource = source
SetTimeout(20000, function()
if(robbers[savedSource])then
rob = false
TriggerClientEvent('esx_holdupbank:plantbombcomplete', savedSource, Banks[robb])
if(xPlayer)then
TriggerClientEvent('esx:showNotification', xPlayer, _U('bombplanted_run'))
local xPlayers = ESX.GetPlayers()
for i=1, #xPlayers, 1 do
local xPlayer = ESX.GetPlayerFromId(xPlayers[i])
if xPlayer.job.name == 'police' then
TriggerClientEvent('esx:showNotification', xPlayers[i], _U('bombplanted_at') .. bank.nameofbank)
end
end
end
end
end)
else
TriggerClientEvent('esx:showNotification', source, _U('c4_needed'))
end
else
TriggerClientEvent('esx:showNotification', source, _U('min_two_police'))
end
end
end)
RegisterServerEvent(âesx_holdupbank:clearweldâ)
AddEventHandler(âesx_holdupbank:clearweldâ, function(x,y,z)
TriggerClientEvent('esx_blowtorch:clearweld', -1, x,y,z)
end)
RegisterServerEvent(âesx_holdupbank:opendoorâ)
AddEventHandler(âesx_holdupbank:opendoorâ, function(x,y,z, doortype)
TriggerClientEvent('esx_holdupbank:opendoors', -1, x,y,z, doortype)
end)
RegisterServerEvent(âesx_holdupbank:plantbombtoallâ)
AddEventHandler(âesx_holdupbank:plantbombtoallâ, function(x,y,z, doortype)
SetTimeout(20000, function()
TriggerClientEvent(âesx_holdupbank:plantedbombâ, -1, x,y,z, doortype)
end)
end)
RegisterServerEvent(âesx_holdupbank:finishclearâ)
AddEventHandler(âesx_holdupbank:finishclearâ, function()
TriggerClientEvent(âesx_blowtorch:finishclearâ, -1)
end)
RegisterServerEvent(âesx_holdupbank:closedoorâ)
AddEventHandler(âesx_holdupbank:closedoorâ, function()
TriggerClientEvent('esx_holdupbank:closedoor', -1)
end)
RegisterServerEvent(âesx_holdupbank:plantbombâ)
AddEventHandler(âesx_holdupbank:plantbombâ, function()
TriggerClientEvent(âesx_holdupbank:plantbombâ, -1)
end)
How can the reward be money to black money?
Just read de fu⌠readme / config instructions
when i booom it door is not open
Hacking stuck up if successful how o fix? please help
same problem to me
Yeah⌠me too
Do you fixed it ?
Guys we need fix this bug with the door opening.
When we hack the door it stays opening and closing in loop. Im trying to fix it a long time and just find a small solution to give me time to pass the doorâŚ
There is:
This is in esx_doorlock\client\main.lua
Some one know how can we integrate the mhacking into esx_doorlock to give access when we open the door by the hacking ?
or other solution, in esx_knatusrobberybank some code to force the door stay opened during the robbery.
btw:
This code is old and donât work:
This one work:
Can some one give hand here ?
Thanks mates
This script work with the new ESX v1.final?
it doesnât work for me, he says he hacks afterwards nothing
My blowtorch get stock on a loop animation and keep trowing blowtorch on the ground, how can i fix that?
anyone got the link for the mhacking?
where is the blowtorch location?
Same problem, any fix ?
Can I Take The Script And Put Him On A Other Bank ?
And How ?
How can I change the config to âenâ? If I change it, it goes back to âdeâ. and the problem is, there is no âdeâ and then it says localede is not exist