[Release] esx_scoreboard


#62

When the server is full (32 players) you cant see all the players or the bottom of scoreboard, u also cant scroll down it either. How can resolve it?


#64

style.css
margin-top: 10%; -> less than 6%


#65

In which line bro ?


#66

I need help please


#67

I saw that the new version of the script changes the name of the function. Haven’t used the new version because it doesn’t count players and gives you error of the xPlayer.source part to count players for some reason. Maybe something Hawaii can look at?


#68

Counting players

function UpdatePlayerTable(connectedPlayers)
	--print(#connectedPlayers)
	local formattedPlayerList = {}
	local p, ems, police, ... = 0, 0, 0, ...

	for k,v in pairs(connectedPlayers) do
		table.insert(formattedPlayerList, ('<tr><td>%s</td><td>%s</td><td>%s</td></tr>'):format(v.name, v.id, v.ping))
		p = p + 1
		if v.job == 'ambulance' then
			ems = ems + 1
		elseif v.job == 'police' then
			police = police + 1
                ..............................................
		end
	end
	
	--print('Players: ' .. p)
	
	SendNUIMessage({
		action  = 'updatePlayerList',
		players = table.concat(formattedPlayerList)
	})

	SendNUIMessage({
		action = 'updatePlayerJobs',
		jobs   = {ems = ems, police = police, ......, player_count = p}
	})
end

Server xPlayer.source

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

#69

i have same problem; please help


#70

Hi I have problem because i see jobs and player count and i’cant see playernames, id, ping. HELP ?


#71

I am getting this error. It shows the menu, but does not contain any player data.
(Cleaned cache files. Ofcourse default scoreboard is marked out and not running. start esx_scoreboard is last line of all start functions in server.cfg)

I think the ‘attempt to index a nil value (local ‘xPlayer’)’ is the cause, anyone has an idea for a fix?

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


#72

@NightStalker @Ilo_Nica update ESX

@blacikk_official latest version has fixed that issue where the player count isn’t properly working.


#73

work only i restart in consolle but after 2 minutes disappear the user online


#74

what? Need more info to help.
Are you saying that its only active for 2 minutes then it disappears?


#75

work only i restart in consolle but after 2 minutes disappear the user online


#76

Error running system event handling function for resource esx_scoreboard: citizen:/scripting/lua/scheduler.lua:41: Fa|
iled to execute thread: server/main.lua:44: attempt to index a nil value (local ‘xPlayer’) |
stack traceback: |
server/main.lua:44: in function ‘AddPlayerToScoreboard’ |
server/main.lua:18: in upvalue ‘handler’ |
citizen:/scripting/lua/scheduler.lua:219: in function citizen:/scripting/lua/scheduler.lua:218


#77

Mine gives this error Can you help me solve it?


Stay that way and yes I took the time did not want.
PS: I already deleted the old one already put in the folder system I already did all this.


#78

Hi,
Same issue => https://github.com/ESX-PUBLIC/esx_scoreboard/issues/13


#79

How can I add emoji (icon)
image https://cdn.discordapp.com/attachments/455024366091108352/541726958560608270/Screenshot_4.png


#80

Place the emoji that you want then save. Once you start your server it converts the emoji to that encrypted text. (Idk why) Im pretty sure that it does this so fivem can read it. Rather then it trying to read an emoji. I could be wrong but its worth a shot. Hope this helped.

If anyone knows why it does this please feel free to comment because i would like to know aswell.


#81

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


#82

I will try it .Thank you