[Release] esx_cratedelivery

@CLOS
Try that.
You have to look the file in /server/main.lua

look for line 15 & 16.

	if xPlayer.getMoney() >= price then
		xPlayer.removeMoney(price)

Replace it by

	local blackMoney = xPlayer.getAccount('black_money').money

	if blackMoney >= price then
		-- xPlayer.removeMoney(price)
		xPlayer.removeAccountMoney('black_money', price)

You, obviously have to be on last version of ESX + have black money account ready on your database.

there’s any way to set it to drop Items instead Weapons?

Im trying to replace the functions that give you weapons but im not being able to do it yet.

if xPlayer.getMoney() >= price then
xPlayer.removeMoney(price)
TriggerClientEvent(β€˜esx:showAdvancedNotification’, -1, _U(β€˜global_title’), _U(β€˜global_subject’), _U(β€˜global_msg’, xPlayer.name, ESX.GetWeaponLabel(weapon)), β€˜CHAR_PROPERTY_PLANE_SCRAP_YARD’, 9)
TriggerClientEvent(β€˜crateDrop’, -1, weapon, ammo, false, 1000.0, dropPoint, β€˜yellow’)
cb(true)
else
cb(false)
end
end)
function GetMetaFromWeapon(weapon)
for i=1, #Config.AvailableWeapons, 1 do
if Config.AvailableWeapons[i].weapon == weapon then
return Config.AvailableWeapons[i].price, Config.AvailableWeapons[i].ammo
end
end
return 0
end

thats the original and y tried to chage every weapon setup on this but i cant find the right ESX function so never give me items delivery.

Its possible which im trying to do or im just wasting time?

thanks!!

How to add required police thing ??