Hey, recently in the server pre-release (v3.8.0) an information packet (technical details on github) was added which allows you to fetch the information you want from your server.
To use it you have to connect to your server over TCP and send I
, the server will then respond with its information in JSON and the length of it, the packet will look like: [int32_t (4 bytes) the size of the data][json data]
with the json data looking like:
{
"clientversion":"2.2.0",
"desc":"BeamMP Default Description",
"guests":"true",
"map":"/levels/gridmap_v2/info.json",
"maxplayers":"10",
"modlist":"",
"modstotal":"0",
"modstotalsize":"0",
"name":"BeamMP Server",
"players":"0",
"playerslist":"",
"port":"30814",
"private":"false",
"tags":"Freeroam",
"version":"3.7.2"
}
You can then parse this in your code and process it as you please.
1 Like