have u fixed it yet
nope.
Amazing Script @RoyaleWind Continue The Good Job!
The players status doesn’t work please help me
Hey there!
![]()
I did some digging and found out that there were some silly mistakes done in the server side of the script. Specifically, the ESX wasn’t initializing an object or property based on the script. This caused an error message called “attempt to index a nil value (local xPlayer)” to show up every time when a player connected and loaded his character.
Update/Compare the server.lua with my code.
ESX = exports["es_extended"]:getSharedObject()
RegisterServerEvent('rw_hud:getServerInfo')
AddEventHandler('rw_hud:getServerInfo', function()
local source = source
local xPlayer = ESX.GetPlayerFromId(source)
```if xPlayer then
local time = '22:00'
local date = '00/00/2022'
time = os.date("%H:%M", os.time() + 1 * 60 * 60 )
date = os.date("%d/%m/%Y",os.time() + 1 * 60 * 60 )
Citizen.Wait(100)
local info = {
money = xPlayer.getMoney(),
bank = xPlayer.getAccount('bank').money,
blackm = xPlayer.getAccount('black_money').money,
dnates = xPlayer.getAccount('donate_coins').money,
time = time,
date = date
}
TriggerClientEvent('rw_hud:setInfo', source, info)
else
print('Initializing object: ' .. tostring(source))
end
end)
In this updated version of the code, i added an if statement to check if the xPlayer variable is not nil before accessing its properties. I also added an else statement to print an error message if the xPlayer variable is nil. This should help you identify any issues with the GetPlayerFromId() method.
Cheers!
first of all remove the ``` symbols them you have to add into your es_extended the account donate_coins!
Where is the download link guys?
There was a problem with the number of players not updating.
[ script:es_extended] [ERROR] Resource rw_hud_i Used the getSharedObject Event, this event no longer exists! Visit https://documentation.esx-framework.org/tutorials/tutorials-esx/sharedevent for how to fix!
[ resources:rw_hud_i] Warning: could not find shared_script config.lua (defined in fxmanifest.lua:22)
I have this error pls someone help me
Hey you can make and double job? Like job2?
fixed it for qbcore as well as added stress system check my github if anyone wants it ill make an esx version later
It doesnt shows the right account money on ESX that a player have. How can i fix that problem ?
u fix it?
