[Release] esx_scoreboard

Would u mind sharing ur ESX addons ur using?

i got totaly fresh here, i think its im missing out of esx_identy or something, trying to install atm and confirm it

Has someone converted names to show RP names yet?

nop still not succeeded

Someone can help me? How can i change all scoreboard to make him little?

I did a fresh install of the resource and got the uptime working just fine but for some reason its having a hard time fetching the player(s) and showing them. Here is the error its showing me in console:

Error running system event handling function for resource esx_scoreboard: citizen:/scripting/lua/scheduler.lua:41: Failed to execute thread: @esx_scoreboard/server/main.lua:43: attempt to index a nil value (local 'xPlayer')
stack traceback:
        @esx_scoreboard/server/main.lua:43: in function 'AddPlayerToScoreboard'
        @esx_scoreboard/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>
Error running system event handling function for resource esx_scoreboard: citizen:/scripting/lua/scheduler.lua:41: Failed to execute thread: @esx_scoreboard/server/main.lua:11: attempt to index a nil value (field '?')
stack traceback:
        @esx_scoreboard/server/main.lua:11: 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>

I found the same issue here and someone told him to update esx but I already have the latest version of esx installed onto my server.

1 Like

Got it working on my 64 slot server, i was missing out on esx_idenity i believe =)

I have seen that several people have had the same error but don’t seem to see an answer. One reply, I did see that someone had come up with something but it didn’t seem complete.

We are receiving the following error:

Error running system event handling function for resource esx_scoreboard: citizen:/scripting/lua/scheduler.lua:41: Failed to execute thread: @esx_scoreboard/server/main.lua:43: attempt to index a nil value (local ‘xPlayer’)
stack traceback:
@esx_scoreboard/server/main.lua:43: in function ‘AddPlayerToScoreboard’
@esx_scoreboard/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

If an admin runs the command ‘/screfresh’ the scoreboard populates however, before running that, it does not populate. Additionally, in order to refresh the list, we must run this command every time.

Would this be solved by adding the code to auto refresh as mentioned in at least one post?

1 Like

Hello, i see veryone has the same error with the server/main.lua:43

attempt to index a nil value (local ‘xPlayer’)

To solve this problem you only need to open server.lua and disable the lines:

 AddEventHandler('esx:playerLoaded', function(playerId, xPlayer)
 	AddPlayerToScoreboard(xPlayer, true)
 end)

and replace for this:

AddEventHandler('esx:playerLoaded', function(source)
	local xPlayer = ESX.GetPlayerFromId(source)
		AddPlayerToScoreboard(xPlayer, true)
end)
4 Likes

i added this scoreboard in and now there’s absolutely no scoreboard. I know i deleted the files from the original scoreboard folder… was that the wrong thing to do?

How do I display the name of the citizen who was registered in the city instead of the player’s default nick ? Could someone help me, please.

1 Like

Help, It does not show how many people are working.

Thanks so much! Got it working with your solution. Any clue why its not showing the scoreboard on UP_ARROW though? I have commented out
# start scoreboard
in my server.cfg file and replaced it with
start esx_scoreboard
further down in the file so it can grab the dependencies first. F10 works fine just nothing when I use the UP_ARROW key. I have checked the wiki (Controls - Cfx.re Docs) but seems there are multiple keys that are used for UP_ARROW :confused:

1 Like

I have an issue where by if anyone is a “boss” they don’t show up on the menu to say they are on duty. Any help with this would be apreciated

When I added

and replace for this:

AddEventHandler('esx:playerLoaded', function(source)
	local xPlayer = ESX.GetPlayerFromId(source)
		AddPlayerToScoreboard(xPlayer, true)
end)

Player ID no longer shows any idea on how to get this back?

1 Like

It’s because you need to bind again the key, look in the lines like, 130 or something, search this on client.lua in the esx_scoreboard

Citizen.CreateThread(function()
while true do
Citizen.Wait(0)

  if IsControlJustReleased(0, **Keys['Y']**) and IsInputDisabled(0) then
  	ToggleScoreBoard()
  	Citizen.Wait(200)

  -- D-pad up on controllers works, too!
  elseif IsControlJustReleased(0, 172) and not IsInputDisabled(0) then
  	ToggleScoreBoard()
  	Citizen.Wait(200)
  end

end
end)

and replace (0, Keys[‘Y’]) for (0, Keys[‘TOP’])

https://i.imgur.com/JMGFtJa.png is 27 in the keybinding list, or “TOP” in lettes if you see here https://i.imgur.com/WcK2FNk.png

:smiley:

1 Like

Yes, if you take your time looking in the script, you will find the answer… Look this https://i.imgur.com/pC17ham.png

Use ingame chat the comand /sctoggle like me:

Before

After

1 Like

Yes, you have scoreboard but you need to see in what keybind are binding, if i’m was correct, it’s on the F10 key

thanks

ÂżAny solution?

Error resuming coroutine: @esx_scoreboard/server/main.lua:42: attempt to call a
nil value (global ‘ForceCountPlayers’)
stack traceback:
@esx_scoreboard/server/main.lua:42: in function <@esx_scoreboard/server/
main.lua:38>

It’s showing steam name over RP name for me.

Any ideas?

2 Likes