Hello. I’ve seen a lot of requests on this plugin combination and I decided to mix something up by edit a simple item plugin since I’m new to coding don’t be suprised if you find any bugs!
Credit goes to Github @ TanguyOrtegat release of esx_holdupbank. Editing of his Plugin.
Credit goes to Github @ johanwulf release of esx_cigarett. Used his plugin to make this Drill.
Feel free to make commits to the plugins!
My Github:
Click Me
Get both of the plugins here:
ESX Drill
ESX HoldUpBank
Known Issues:
You can cancel the drill animation at any time and still keep on robbing till the timer runs out.
Installation:
Upload both to resources/[esx] folder.
Add these to server.cfg
start esx_borrmaskin
start esx_holdupbank
Create “drill” in items table. ( You can change Borrmaskin to whatever name you like )
INSERT INTO `items` (`name`, `label`, `limit`) VALUES
('drill', 'Borrmaskin', 1)
;
If you want the Drill to be added to esx_shops insert this SQL Query into shops.
INSERT INTO `shops` (name, item, price) VALUES
('TwentyFourSeven','drill',1000),
('RobsLiquor','drill',1000),
('LTDgasoline','drill',1000)
;
To test it out ingame type /giveitem playerid drill 1.
Edit config.lua
Config.NumberOfCopsRequired = 1
To
Config.NumberOfCopsRequired = 0
in esx_holdupbank or you can just set yourself as a cop and do the robbery.
Update
If you want to add the drill to be buyable from a gang add this in server.lua. Remember to replace esx_cartel, society_cartel with proper job names etc.
RegisterServerEvent('esx_cartel:buyItem')
AddEventHandler('esx_cartel:buyItem', function()
TriggerEvent('esx_addonaccount:getSharedAccount', 'society_cartel', function(account)
TriggerEvent('esx_addoninventory:getSharedInventory', 'society_cartel', function(inventory)
if account.money >= 250000 then
TriggerClientEvent('esx:showNotification', source, 'Du har köpt en borrmaskin för $250000')
inventory.addItem('drill', 1)
account.removeMoney(250000)
else
TriggerClientEvent('esx:showNotification', source, 'Medges ej')
end
end)
end)
end)
Then add this in client.lua
if data.current.value == 'get_drill' then
TriggerServerEvent('esx_cartel:buyItem')
end