Mobius1 / esx_xp

XP Ranking System for FiveM
46 stars 23 forks source link

Found problem for leaderboard not showing players. #8

Closed ghost closed 4 years ago

ghost commented 4 years ago

Hi! I have found the problem with the leaderboard not showing up players.

In my database, I use Rockstar License to store players, but in the GetOnlinePlayers() function , the GetPlayerIdentifier(), gets the steam license.

ghost commented 4 years ago

Managed to fix that problem, but now, others show up.

1) After adding fake players, and then deleting them, it also deletes me from the leaderboard.

2) After deleting the fake players, the page dosen't go back to page 1.

3) Some errors in the console after using the remove fake players command:

image

ghost commented 4 years ago

`local identifier

        for _b, _n in pairs(GetPlayerIdentifiers(playerId))do

            if string.sub(_n, 1, string.len("license:")) == "license:" then
                identifier = string.gsub(_n, "license:", "")
            end
        end`

This is the thing I used to solve my first problem.