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?
style.css
margin-top: 10%; -> less than 6%
In which line bro ?
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?
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)
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>
@NightStalker @Ilo_Nica update ESX
@blacikrul latest version has fixed that issue where the player count isn’t properly working.
work only i restart in consolle but after 2 minutes disappear the user online
what? Need more info to help.
Are you saying that its only active for 2 minutes then it disappears?
work only i restart in consolle but after 2 minutes disappear the user online
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
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.
How can I add emoji (icon)
https://cdn.discordapp.com/attachments/455024366091108352/541726958560608270/Screenshot_4.png
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.
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
I will try it .Thank you