[HELP] Database Scoreboard

okay so i got a working character registration script working when u first join u have to choose your name and age etc. this is what it looks like in the database

what i want to do is i want the first name [nom] and last name [prenom] to show up in the default scoreboard

this is what the code for it looks right now

        if IsControlPressed(0, 20)--[[ INPUT_PHONE ]] then
            if not listOn then
                local players = {}
                ptable = GetPlayers()
                for _, i in ipairs(ptable) do
                    local wantedLevel = GetPlayerWantedLevel(i)
                    r, g, b = GetPlayerRgbColour(i)
                    table.insert(players, 
                    '<tr style=\"color: white\"><td>' .. GetPlayerServerId(i) .. '</td><td>' .. GetPlayerName(i) .. '</td></tr>'

this part is where i need to get the nom - prenom working
.. GetPlayerName(i) ..

anyy help appreciated

Show us the function at least…
Also you didnt show the NUI part

there is no function thats whatt im saying i need tto create one
and then call it

For the NUI part ?
I’ll recommand you to read the wiki, then go over the tutorial section to have an idea of what NUI is

i dont know if i explained it correct

what im trying to do is i got info in a databse
im trying to get it to show in the scoreboard

The natif one ? Cause you better make your own

He’s using vRP, and it seems he doesn’t know how to code Lua, research both first and then you’ll be able to do what you need, it’s pretty simple.

i am not using vrp cause that framework is cancer maybe if any of u could read, i said all i want to do is get the info from that database screenshot i sent specifically collum nom and prenom into a scoreboard, and yes i am using the standard scoreboard its a litttle modified by me but not any major changes now if u dont want to contribute by helping dont even write here, im doing research but at the same time it doesnt fucken hurt to ask on the forums for help maybe someone already knows how to do this

Yeah, just get mad at anything right?

Your database looks really close to vRP (also a really good framework, your post history shows you have experience with the psycho edited version, which is bad.), are you using a public RP resource or you made it?

Just search for a function somewhere in your resource that retrieves the user’s first and last name, maybe you have an array with all connected users with their info? If not I recommend you to make one that gets updated everytime a user joins/leaves the server and then export a function that returns that array, on your scoreboard resource you just invoke that function and parse the data, otherwise you would query the database everytime a user checks the scoreboard and that will cause trouble.

As I said, it’s really simple to do. But without knowing your RP code we can’t help you code what you need.
Most servers code the compatibility with other resources on their own and normally don’t release it.

im using esx which is 10 times better then vRP, im also using gcidentity as a character creattion script when someone first joins the server the can choose their first name and surname that info saves to a mysql database as u can see as nom and prenom what im trying to do is get that info into the scoreboard so instead of a nickname it shows the persons first namee and last name, i dont know how to code but ive got a basic idea of the stuff im working with and im not mad its just everyone is stating the same shit over and over, ofcourse i did some research my self i even got it working almost only if the fucken fxserver export functions worked properly

The exports do work as intended, you’re probably doing something wrong.

What you could do to avoid making your own exports (I don’t recommend, it will add yet another db resource, but it would work) is to use the mysql_async resource and inside the scoreboard resource you check the player identification when a user joins and search for it on the database, match the player’s first and last name with their respective identification in a k,v array (server side, ofc, then transmit a copy to the client) and add to the scoreboard, remove from the array when the respective user leaves.

the export came with gcidentity and no im not doing anything wrong i had 3 guys check it and it should work it doesnt even the guy who made essentialmode kanepers said that exports are random