- FiveM App Client: Canary Mode
- Goal: Looping player names in a menu and looking at a player in front of me.
- Result: “player 3” returned by client. (Whilst there are multiple clients connected) (Used: GetActivePlayers() and other clients seems to be invisible.
- Native issue.
I went to the vMenu, opened up “online players”. 6 players should appear. It shows only “player 3”.
I went to visit my buddy at the petrol station. My buddy, who’s using release mode for FiveM can see me. I use Canary mode and can not see him.
I think the developers of Canary Mode could understand where they changed something which could influence this. I’ve discussed the issue in the FiveM discord and heard others experienced the same. On their and my behalf I post this report.
Some related code:
for _, player in ipairs(GetActivePlayers()) do local pedName = GetPlayerName(player) if WarMenu.MenuButton('» '..pedName, 'playergroups') then selectedPed = pedName print("selected ped = "..selectedPed) end end
Print result was: player 1
Print expected result was: Nightwalkersfear
Reproducing the bug
→ Install vMenu (latest)
→ Open the menu
→ Online players
→ Result will be “player X” instead of a list of GetPlayerName(players) names.
→ Log in to a server with a second client connected (other player)
→ Play hide and seek, because you probably won’t see eachother.
Reproducing the bug with code
→ Write a client thread:
Citizen.CreateThread(function() while true do Citizen.Wait(1000) -- Send player list of names every second for _, player in ipairs(GetActivePlayers()) do local pedName = GetPlayerName(player) print("PedName = "..pedName) end end end)