Closed HalCroves closed 5 years ago
Update esx
@ElPumpo @HalCroves What did you do to solve this. I am also getting this issue and I have the latest version of esx.
i already have the lastest version of esx an i have the same error
Error running system event handling function for resource esx_scoreboard: citizen:/scripting/lua/scheduler.lua:41: Failed to execute thread: server/main.lua:43: attempt to index a nil value (local 'xPlayer') stack traceback: server/main.lua:43: in function 'AddPlayerToScoreboard' server/main.lua:17: in upvalue 'handler' citizen:/scripting/lua/scheduler.lua:219: in function <citizen:/scripting/lua/scheduler.lua:218> stack traceback: [C]: in function 'error' citizen:/scripting/lua/scheduler.lua:41: in field 'CreateThreadNow' citizen:/scripting/lua/scheduler.lua:218: in function <citizen:/scripting/lua/scheduler.lua:182>
Replace
AddEventHandler('esx:playerLoaded', function(playerId, xPlayer)
AddPlayerToScoreboard(xPlayer, true)
end)
with
AddEventHandler('esx:playerLoaded', function(xPlayer)
AddPlayerToScoreboard(xPlayer, true)
end)
and remove .source
from AddPlayerToScoreboard
like local playerId = xPlayer
Where can I replace the default icons?
Yes in -> esx_scoreboard/html/scoreboard.html at the line 14 to 19.
`<div class="header">
<div class="jobs">
<p style="color:red;"> 👨⚕️ <span id="ems">0</span> </p>
<p style="color:#5ea1e0;"> 👮🏻 <span id="police">0</span> </p>
<p style="color:yellow;"> 🚕 <span id="taxi">0</span> </p>
<p style="color:grey;"> 🔧 <span id="mechanic">0</span> </p>
<p style="color:lightblue;"> 🚗 <span id="cardealer">0</span> </p>
<p style="color:#58ce93;"> 🏘️ <span id="estate">0</span> </p>
</div>
</div>`
can u guys help me how to change steam name to Indetity name in the game
So thank you bro
i have some other problem again with this script
SCRIPT ERROR: @esx_scoreboard/server/main.lua:54: attempt to index a nil value (field 'player') that is what it says in the console
if xPlayer.player.getGroup() == 'user' then Citizen.CreateThread(function() Citizen.Wait(3000) TriggerClientEvent('esx_scoreboard:toggleID', playerId, false) end) end end this is the comand that is wrong pls someone help
Hi, Thank you for all the resources you are updating!
Since your last upload, at the start of the addon, I get the error message "attempt to index a nil value (local 'xPlayer') at line 44".
For me the line 44 is :
local playerId = xPlayer.source
I can not understand why he can not retrieve information from "xPlayer" derived from
AddEventHandler('esx:playerLoaded', function(playerId, xPlayer)
.But when I restart the addon, it retrieves the information.
For the moment, i have replace the function :
By :
But I think it's a lousy method
Do you have an idea on this?
Thanks on advance.
Cordially, Hal