mirror of
https://github.com/esx-framework/esx_core.git
synced 2026-08-29 01:08:54 +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)
|
||||
|
||||
if xPlayer.getMoney() >= Config.LicensePrice then
|
||||
xPlayer.removeMoney(Config.LicensePrice)
|
||||
xPlayer.removeMoney(Config.LicensePrice, "Weapon License")
|
||||
|
||||
TriggerEvent('esx_license:addLicense', source, 'weapon', function()
|
||||
cb(true)
|
||||
@@ -28,7 +28,7 @@ ESX.RegisterServerCallback('esx_weaponshop:buyWeapon', function(source, cb, weap
|
||||
else
|
||||
if zone == 'BlackWeashop' 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)
|
||||
|
||||
cb(true)
|
||||
@@ -38,7 +38,7 @@ ESX.RegisterServerCallback('esx_weaponshop:buyWeapon', function(source, cb, weap
|
||||
end
|
||||
else
|
||||
if xPlayer.getMoney() >= price then
|
||||
xPlayer.removeMoney(price)
|
||||
xPlayer.removeMoney(price, "Weapons Deal")
|
||||
xPlayer.addWeapon(weaponName, 42)
|
||||
|
||||
cb(true)
|
||||
|
||||
Reference in New Issue
Block a user