FiveM Player Query Tutorial

You can now show the status of your FiveM server in your game launchers thanks to this PHP script devised by XPreciousGaming (we love you)!

This is a PHP file that you should create, configure then upload to a webserver (any web server that has PHP). Once you have created, edited and uploaded it you can then point to this PHP file using the QUERY STRING object inside Game Launcher Creator to show a real-time player count of your FiveM server(s).

PLEASE NOTE – These scripts are now unsupported. There are new scripts available in the Store.

Step 1 – Copy the PHP Code

Firstly, you need to copy the following PHP code to notepad on your computer… You can now show the status of your FiveM server in your game launchers thanks to this PHP script devised by XPreciousGaming (we love you)! This is a PHP file that you should create, configure then upload to a webserver (any web server that has PHP). Once you have created, edited and uploaded it you can then point to this PHP file using the QUERY STRING object inside Game Launcher Creator to show a real-time player count of your FiveM server(s).

Step 1 – Copy the PHP Code

Firstly, you need to copy the following PHP code to notepad on your computer… Online”; print ” $pl_count / $server_settings[max_slots] “; endif; ?>

Once you have copied, then pasted this into a new notepad file, we will need to modify some of it.

If this code don’t work download it here https://gamelaunchercreator.com/forums/work-in-progress-releases/fivem-server-stats-php/#post-131

Step 2 – Server Modification

Now you need to modify some of the settings to match your server, to get the correct server information.

The first line to edit is under [ SETTINGS ] and it is:

  • $server_settings[‘ip’] = “YOUR IP GOES HERE” – where it says your IP here, replace this inside the speech marks, with your server IP (not port, just IP address)
  • $server_settings[‘port’] = “YOUR PORT GOES HERE” – pop in your server port here, typically 30120
  • $server_settings[‘max_slots’] = “64” – pop in the maximum slots available for your FiveM Server (default is 24)

Now this is complete, you can save this file. When the Save As dialog pops up, select All Files (.) and type in player-query.php

Once you have saved your file, upload it to your web server, it must support PHP (most do, Windows ones don’t, by default). Once you have uploaded it, write down the URL, typically something like (https://mysite.com/player-query.php)

Step 3 – Integrating into your FiveM Game Launcher

Now open up Game Launcher Creator, insert a Query String, head over to the properties of that string and put in your URL for the post-url like so

FiveM Player Query String PHP

Insert the full URL in the POST url box, to test this, try inserting this URL into your web browser, it should display how many players are currently active on your FiveM server. You can write whatever you like in the pre-POST and POST text strings. You can also change the font settings from this dialog too. You can move and position the query string in the live launcher editor for your game launcher. Once you have copied, then pasted this into a new notepad file, we will need to modify some of it.

Step 2 – Server Modification

Now you need to modify some of the settings to match your server, to get the correct server information. The first line to edit is under [ SETTINGS ] and it is:

  • $server_settings[‘ip’] = “YOUR IP GOES HERE” – where it says your IP here, replace this inside the speech marks, with your server IP (not port, just IP address)
  • $server_settings[‘port’] = “YOUR PORT GOES HERE” – pop in your server port here, typically 30120
  • $server_settings[‘max_slots’] = “64” – pop in the maximum slots available for your FiveM Server (default is 24)
  • Now this is complete, you can save this file. When the Save As dialog pops up, select All Files (.) and type in player-query.php

Once you have saved your file, upload it to your web server, it must support PHP (most do, Windows ones don’t, by default). Once you have uploaded it, write down the URL, typically something like (https://mysite.com/player-query.php)

Step 3 – Integrating into your FiveM Game Launcher

Now open up Game Launcher Creator, insert a Query String, head over to the properties of that string and put in your URL for the post-url like so

FiveM Player Query String PHP

Insert the full URL in the POST url box, to test this, try inserting this URL into your web browser, it should display how many players are currently active on your FiveM server. You can write whatever you like in the pre-POST and POST text strings. You can also change the font settings from this dialog too. You can move and position the query string in the live launcher editor for your game launcher.

84 views

Customer Login

If you are a product customer and want to access the private support forum sections and other resources here, login with your Store account.