Open Krashcant opened 1 year ago
can you show me the file from /bridge/framework/server/qbcore.lua
f not QBCORE then return end
GetPlayerFromId = function(src) local self = QBCORE.Functions.GetPlayer(src) if not self then return end
if self.identifier == nil then
self.identifier = self.PlayerData.citizenid
end
self.getMoney = function(value)
return self.PlayerData.money['cash']
end
self.removeMoney = function(value)
self.Functions.RemoveMoney('cash',tonumber(value))
return true
end
self.name = self.PlayerData.charinfo.firstname
self.addMoney = function(value)
return self.Functions.AddMoney('cash',tonumber(value))
end
self.removeAccountMoney = function(type,val)
if type == 'money' then type = 'cash' end
self.Functions.RemoveMoney(type,tonumber(val))
return true
end
self.getAccount = function(type)
if type == 'money' then type = 'cash' end
return {money = self.PlayerData.money[type]}
end
return xPlayer
end
Failed to rent only happened to me when the player/s didn’t have the correct money the only thing not working for me it’s the Keys Item apart from that all is good
I thought that and made sure I had cash and money in bank,, I also did create a key item and it does spawn manually through TX
your using old version i told from cfx i updated the resource 2 days ago was not a joke.
Failed to rent only happened to me when the player/s didn’t have the correct money the only thing not working for me it’s the Keys Item apart from that all is good
you could open an issue regarding keys?
this is tested in qbcore using qb-inv , esx ox_inventory.
ok that did it, the updated file, thank you and good work
I have everything installed and works, even added "keys" in qbinventory, yet i get the error in game "failed to rent" on the server side it get: [ script:renzu_motels] SCRIPT ERROR: @renzu_motels/server/main.lua:69: attempt to index a nil value (local 'xPlayer')
I am stuck, any help is much appreciated
someone else had exact same issue on the forum but no fix answer posted, I tried to ask there and got the answer this was fixed 2 days ago.. I am so confused at this point as nothing was fixed for me and no idea how you fixed the other persons same issue. thanks