feat(esx_weaponshop): Reasons For account changes

This commit is contained in:
Mycroft
2022-09-10 01:14:45 +01:00
parent 6a97cc1045
commit 9284d20b5c
+3 -3
View File
@@ -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)