Username:    Password:        Click Here To Signup     Forgotten Password
Main Menu
Online
Members: 0

Guests: 14

107.22.x.x forum
112.111.x.x forum
173.199.x.x forum
178.255.x.x lgsl
180.76.x.x forum
192.151.x.x forum
217.118.x.x download
218.213.x.x forum
59.58.x.x news
66.249.x.x forum
66.249.x.x dilbertplus
81.52.x.x donation_l..
92.82.x.x news
94.23.x.x news

Last Seen

ODDBALL118 Sun 22:17
code72 Sun 19:52
xMin Sun 18:02
Wussie Sun 17:35
Hostprofil Sun 15:10

Newest Members

Forums
Adding more variables from server?
Shadow_ASP
Tue Jun 05 2012, 04:45AM
Posts: 3
Joined: Tue Jun 05 2012, 04:31AM
Registered Member #7242
Hi,

I'm trying to add two more variables that are received from a server; "mission" and "gamever" (See picture).
I'm guessing I need to define those in lgsl_class.php but I've not had any luck so far.
My PHP-skills are also extremely limited.
The page is located here (formatting is wip, working on integrating it with a PHP-Fusion site).
Can someone please help me with this?

Btw I had to change the protocol (09) to (06) for ArmA 2 because ArmA 2 now use Gamespy Protocol 3 and not 2, otherwise you get "Server offline/not responding".
Rich
Wed Jun 06 2012, 02:11PM
Posts: 1700
Joined: Wed Nov 26 2003, 04:30PM

Stuff like mission will be under the ['e'] for extra variables.

"Mission: {$server['e']['mission']}";

If you are adapting the zone block, you need to change the request from "sp" ( standard and players ) to "sep".
Website
Shadow_ASP
Thu Jun 07 2012, 03:30AM
Posts: 3
Joined: Tue Jun 05 2012, 04:31AM
Registered Member #7242
Thanks. For once there is a easy HTML/PHP solution hehe
I got it working now. I was trying {$server['s']['mission']}";
I have modified lgsl_details.php
What do you mean by changing the request from "sp" to "sep"?
Rich
Thu Jun 07 2012, 02:17PM
Posts: 1700
Joined: Wed Nov 26 2003, 04:30PM

In the list, details, zone, you will see something like:

$server = lgsl_query_cached("", "", "", "", "", "sep", $lgsl_server_id);

The "sep" part is what data you want.

[s] standard
[e] extra details
[p] player details

By default the list only asks for "s", and the zone only asks "sp", which can make things faster, as behind the scenes it allows LGSL to only request what is needed.
Website
Shadow_ASP
Fri Jun 08 2012, 02:33AM
Posts: 3
Joined: Tue Jun 05 2012, 04:31AM
Registered Member #7242
Thanks for explaining the SEP-part. I can understand its faster if querying many servers simultaneously. I dont think its a problem for me. I'm only running 2 servers with LGSL (ArmA2 CO & Raven Shield). The R6 server is on only occasionally. Both servers and the website is on the same server.

 

Jump:     Back to top


You are not logged in - Click Here To Signup

Username:    Password:   

Mini Buttons

.... © GreyCube.com - Richard Perry - Powered by e107.org