Austinb / GameQ

A PHP Gameserver Status Query Library
https://austinb.github.io/GameQ/
GNU Lesser General Public License v3.0
402 stars 134 forks source link

gta 5 #336

Closed zer0sec closed 7 years ago

zer0sec commented 8 years ago

Hi, there was a recent emulator created called fivereborn which lets you host gta 5 servers someone created a small php script that shows you player amount and players on the server i was wondering if you could help me add this into the gameq? his code was :::

<?PHP
$myIp = "80.167.155.178:30120";
$online_api = file_get_contents('http://five-serverlist.com/api/playerlist.php?ip='.$myIp, false, $context);
$response = json_decode($online_api);

/* Display errors */
if(sizeof($response->{'errors'}) > 0) {
    echo("Errors: <br>");
    for($i = 0; $i < sizeof($response->{'errors'}); $i++) {
        echo($response->{'errors'}[$i]."<br>");
    }
}

/* Display player count*/
echo("<br>Player online: ".$response->{'client_count'} . "<br>");

/* Display all playernames */
for($i = 0; $i < sizeof($response->{'clients'}); $i++) {
    echo($response->{'clients'}[$i]."<br>");
}
?>

Pretty much just need help creating the protocol

i tried adding it in my self but no luck his post http://forum.fivereborn.com/topic/542/playerlist-on-website

Austinb commented 7 years ago

Probably can wrap this around the http protocol class to query that api directly. Curious as to why no direct access... Is there any call for all of the information in one swoop or is player information the only thing really wanted in GTA 5?

zer0sec commented 7 years ago

This is all still new atm i'm not sure what the other class names are for server name etc i'll try get them and let you know

Austinb commented 7 years ago

@zer0sec Any updates on information for this protocol? Is there a GTA 5 direct access protocol by chance now?

zer0sec commented 7 years ago

find all details on http://www.fivereborn.com

Austinb commented 7 years ago

There is a node.js version I can use to get info now - https://github.com/LiquidObsidian/fivereborn-query/blob/master/index.js.

@zer0sec Is there a server list anywhere that works? I tried http://five-serverlist.com/ but the page appears to not do anything.

rststeam commented 7 years ago

There is server list in game

188.165.252.197:32121

You can test on my server 24/7 online

Also there is new server released FX https://wiki.fivem.net/wiki/Running_FXServer i don't know if they changed anything. Looking forward to see this protocol

Austinb commented 7 years ago

Build protocol for GTA FiveM from https://fivem.net/. I was unable to query your server at 188.165.252.197:32121. Please let me know if your server has gone down or changed. Also let me know if the following commit does not allow you to query your server.