es_extended dosyasının server/classes/player.lua kısmında;
bu kodu
self.getMoney = function()
return self.player.get('money')
end
alttaki kodla
self.getMoney = function()
local money = self.getInventoryItem('cash')
if self.player.get('money') ~= money.count then
self.player.set('money',money.count)
end
return money.count
end
bu kodu
self.addMoney = function(money)
money = ESX.Math.Round(money)
if money >= 0 then
self.player.addMoney(money)
else
print(('es_extended: %s attempted exploiting! (reason: player tried adding -1 cash balance)'):format(self.identifier))
end
end
self.removeMoney = function(money)
money = ESX.Math.Round(money)
if money >= 0 then
self.player.removeMoney(money)
else
print(('es_extended: %s attempted exploiting! (reason: player tried removing -1 cash balance)'):format(self.identifier))
end
end
bununla değiştirmelisiniz
self.addMoney = function(money)
money = ESX.Math.Round(money)
if money >= 0 then
self.addInventoryItem("cash",money)
local money = self.getInventoryItem('cash')
if self.player.get('money') ~= money.count then
self.player.set('money',money.count)
end
else
print(('es_extended: %s attempted exploiting! (reason: player tried adding -1 cash balance)'):format(self.identifier))
end
end
self.removeMoney = function(money)
money = ESX.Math.Round(money)
if money >= 0 then
self.removeInventoryItem("cash",money)
local money = self.getInventoryItem('cash')
if self.player.get('money') ~= money.count then
self.player.set('money',money.count)
end
else
print(('es_extended: %s attempted exploiting! (reason: player tried removing -1 cash balance)'):format(self.identifier))
end
end
--Ve en son olarak database e cash adında bir item ekleyip limit kısmını yüksek bir sayı yaparsanız para item olarak eklenmiş olacak.