Getting number of online players of a server with C#


#1

Hi there,

Everything’s in the title. Is it possible to do this ? I’d like to show this value in my form, and I don’t have any clue about it.

Thank you guys for your answers.

Cheers :slight_smile:


#2

On https://servers-live.fivem.net/api/servers/ there is a clients which should give the total players on that server


#3

Nice ! Thanks ^^

Gotta figure out how to get the data I need anyway, but shouldn’t be a problem :stuck_out_tongue:


#4

Do you mean in your server and get the number of players online from your server?


#5

In my C# form, get the number of players online from my server, exactly.


#6

Something on your desktop or in game?


#7

Desktop app. //20chars


#8

btw, I was just thinking : isn’t that already implemented with FiveM Discord Rich Presence ? Maybe I could use the same method, idk.


#9

Found the way to do it, with players.json and some C# functions (usage of JsonConvert, etc…)

Thanks guys !