mirror of
https://github.com/esx-framework/esx_core.git
synced 2026-09-04 16:23:21 +00:00
feat(esx_weaponshop): Reasons For account changes
This commit is contained in:
@@ -3,7 +3,7 @@ ESX.RegisterServerCallback('esx_weaponshop:buyLicense', function(source, cb)
|
|||||||
local xPlayer = ESX.GetPlayerFromId(source)
|
local xPlayer = ESX.GetPlayerFromId(source)
|
||||||
|
|
||||||
if xPlayer.getMoney() >= Config.LicensePrice then
|
if xPlayer.getMoney() >= Config.LicensePrice then
|
||||||
xPlayer.removeMoney(Config.LicensePrice)
|
xPlayer.removeMoney(Config.LicensePrice, "Weapon License")
|
||||||
|
|
||||||
TriggerEvent('esx_license:addLicense', source, 'weapon', function()
|
TriggerEvent('esx_license:addLicense', source, 'weapon', function()
|
||||||
cb(true)
|
cb(true)
|
||||||
@@ -28,7 +28,7 @@ ESX.RegisterServerCallback('esx_weaponshop:buyWeapon', function(source, cb, weap
|
|||||||
else
|
else
|
||||||
if zone == 'BlackWeashop' then
|
if zone == 'BlackWeashop' then
|
||||||
if xPlayer.getAccount('black_money').money >= price then
|
if xPlayer.getAccount('black_money').money >= price then
|
||||||
xPlayer.removeAccountMoney('black_money', price)
|
xPlayer.removeAccountMoney('black_money', price, "Black Weapons Deal")
|
||||||
xPlayer.addWeapon(weaponName, 42)
|
xPlayer.addWeapon(weaponName, 42)
|
||||||
|
|
||||||
cb(true)
|
cb(true)
|
||||||
@@ -38,7 +38,7 @@ ESX.RegisterServerCallback('esx_weaponshop:buyWeapon', function(source, cb, weap
|
|||||||
end
|
end
|
||||||
else
|
else
|
||||||
if xPlayer.getMoney() >= price then
|
if xPlayer.getMoney() >= price then
|
||||||
xPlayer.removeMoney(price)
|
xPlayer.removeMoney(price, "Weapons Deal")
|
||||||
xPlayer.addWeapon(weaponName, 42)
|
xPlayer.addWeapon(weaponName, 42)
|
||||||
|
|
||||||
cb(true)
|
cb(true)
|
||||||
|
|||||||
Reference in New Issue
Block a user