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

Guests: 29

180.76.x.x forum
180.76.x.x forum
180.76.x.x forum
46.229.x.x lgsl
46.229.x.x forum
46.229.x.x dilbertplus
46.229.x.x forum
46.229.x.x dilbertplus
46.229.x.x forum
46.229.x.x forum
46.229.x.x forum
46.229.x.x forum
46.229.x.x forum
46.229.x.x forum
46.229.x.x forum
46.229.x.x user
54.167.x.x forum
54.36.x.x forum
54.36.x.x forum
54.36.x.x forum
54.36.x.x forum
54.36.x.x forum
54.36.x.x dilbertplus
54.36.x.x forum
54.36.x.x user
54.36.x.x user
54.36.x.x forum
66.249.x.x forum
78.46.x.x dilbertplus

Last Seen

Wussie Sun 04:19
Dodgeitorelse Sat 23:29
Technodweeb Sat 20:53
Brett Smith Sat 01:54
Adam Milne Sat 01:41

Newest Members

Forums
Mafia 2 - Mafia II
85filip58
Tue Apr 29 2014, 11:07AM

Posts: 125
Joined: Wed Aug 01 2012, 08:39AM
Registered Member #7331
Hello, is posible to add Mafia 2 into lgsl? I don't know, how to. But i found original query protocol for Mafia 2 multiplayer server from developers but I don't know how to use it in lgsl.

There is download link.

Thanks for help

Head Admin of ServerList: www.GameW.eu
Website
Wussie
Tue Apr 29 2014, 04:53PM

Posts: 433
Joined: Sun Mar 22 2009, 06:53AM
Registered Member #4938
I'll give it a try these days.

Not working for you?
Don't forget to share the IP/ports of the offending server so that people can do tests and help you.
Oh, and if you're using a modified lgsl_protocol.php, make sure you disable the feed or it may NOT work!
Website
85filip58
Wed Apr 30 2014, 01:04PM

Posts: 125
Joined: Wed Aug 01 2012, 08:39AM
Registered Member #7331
Thanks.

Head Admin of ServerList: www.GameW.eu
Website
Wussie
Thu May 01 2014, 06:11PM

Posts: 433
Joined: Sun Mar 22 2009, 06:53AM
Registered Member #4938
The info you found was exactly what I needed, good job Filip! The solution comes next.
If you start off with the original, unmodified lgsl_protocol.php, firstly find
"kingpin" => "Kingpin: Life of Crime",
AFTER this line you insert:
"m2mp" => "Mafia 2 Multiplayer",

After
"kingpin" => "03",
insert
"m2mp" => "38",

After
"kingpin" => "qtracker://{IP}:{S_PORT}?game=Kingpin&action=show",
insert
"m2mp" => "http://m2-multiplayer.com/‎",

After
case "killingfloor" : $c_to_q = 1; $c_def = 7707; $q_def = 7708; $c_to_s = 0; break;
insert
case "m2mp" : $c_to_q = 1; $c_def = 27015; $q_def = 27016; $c_to_s = 0; break;

Then find
function lgsl_query_feed(...
and BEFORE it insert
function lgsl_query_38(&$server, &$lgsl_need, &$lgsl_fp)
{
fwrite($lgsl_fp, "M2MP"); // request status
$buffer = fread($lgsl_fp, 4096);
if (!$buffer) { return FALSE; }

$buffer = substr($buffer, 4);
$server['s']['name'] = lgsl_cut_pascal($buffer, 1, -1);
$server['s']['map'] = 'Mafia 2';
$server['s']['players'] = lgsl_cut_pascal($buffer, 1, -1);
$server['s']['playersmax'] = lgsl_cut_pascal($buffer, 1, -1);
$server['e']['gamemode'] = lgsl_cut_pascal($buffer, 1, -1);
$server['s']['password'] = ord(lgsl_cut_byte($buffer, 1));

if ($lgsl_need['p'] && $server['s']['players']) {
for ($i = 0; $i < $server['s']['players']; $i++) {
$server['p'][$i]['name'] = lgsl_cut_pascal($buffer, 1, -1);
}
}
return TRUE;
}
//------------------------------------------------------------------------------------------------------------+
//------------------------------------------------------------------------------------------------------------+

If you're using a custom lgsl_protocol.php, make sure the number 38 is not already used by another custom function.
Default $c_port is 27015 and $q_port=$c_port+1. Servers do not return any map info and player lists only consist of names.
I'm not really sure if passworded servers show up correctly because I was unable to find one for testing. Let me know if you find any bugs.
This is an icon you can use:
And there you have it: Mafia 2 MP support in LGSL, one more time before gametracker !

Not working for you?
Don't forget to share the IP/ports of the offending server so that people can do tests and help you.
Oh, and if you're using a modified lgsl_protocol.php, make sure you disable the feed or it may NOT work!
Website
Dodgeitorelse
Thu May 01 2014, 07:31PM
Posts: 246
Joined: Sun Dec 12 2010, 09:16AM
Registered Member #6457
goody goody goo I love it when gametracker is behind


lack of effort on your part requires less effort on my part
Website
85filip58
Fri May 02 2014, 03:13AM

Posts: 125
Joined: Wed Aug 01 2012, 08:39AM
Registered Member #7331
Thank you very much!! :*

Head Admin of ServerList: www.GameW.eu
Website
Wussie
Fri May 02 2014, 04:56AM

Posts: 433
Joined: Sun Mar 22 2009, 06:53AM
Registered Member #4938
You are welcome sir.

I think I got a better understanding of the way servers report password so I updated the code above to reflect it. Let's see if I was right this time.
Also changed the name to Mafia 2 Multiplayer, since the game seems to be signifficantly different from the original Mafia II PC.

Not working for you?
Don't forget to share the IP/ports of the offending server so that people can do tests and help you.
Oh, and if you're using a modified lgsl_protocol.php, make sure you disable the feed or it may NOT work!
Website
85filip58
Fri May 02 2014, 01:33PM

Posts: 125
Joined: Wed Aug 01 2012, 08:39AM
Registered Member #7331
Work for me good here.

Head Admin of ServerList: www.GameW.eu
Website
85filip58
Tue Jun 10 2014, 08:30AM

Posts: 125
Joined: Wed Aug 01 2012, 08:39AM
Registered Member #7331
Wussie I have question, maybe is possible to create settings like: summer 1/0, gamemode a some information from server if exists ?

Head Admin of ServerList: www.GameW.eu
Website
Wussie
Tue Jun 10 2014, 04:25PM

Posts: 433
Joined: Sun Mar 22 2009, 06:53AM
Registered Member #4938
The gamemode is already in place.
Other than that, there is very little information available from servers and almost all of it gets displayed by LGSL.
In fact, the only byte of information that I'm not sure what it means is a zero byte (\x00), which could mean 'no password', or maybe something else.
There is no explicit information about 'summer'. Could that zero mean 'summer 1'? Maybe, but I have no idea. I would have to find a passworded server first, or a server running something other than 'summer 1' before I could figure out what that zero means.

Not working for you?
Don't forget to share the IP/ports of the offending server so that people can do tests and help you.
Oh, and if you're using a modified lgsl_protocol.php, make sure you disable the feed or it may NOT work!
Website
85filip58
Wed Jun 11 2014, 04:30AM

Posts: 125
Joined: Wed Aug 01 2012, 08:39AM
Registered Member #7331
This ismy mafia2 server, http://www.game-state.com/93.91.250.147:27582/ and in server variables are shown info about gametype - server game mode EBDM or other and summer is 1 or 0 what mens that is on server set summer time or something else

Head Admin of ServerList: www.GameW.eu
Website
Wussie
Wed Jun 11 2014, 02:09PM

Posts: 433
Joined: Sun Mar 22 2009, 06:53AM
Registered Member #4938
M2MP\x14MPZona.CZ - Mafia 2\x020\x04100\x0AMPZona.CZ\x00\x01


This is your server's response to the query. Not much, as you can see.
I know exactly what each byte means, except for the '\x00' right before the final byte. That is the byte I suspected to be specifying the presence of a password.
If you think it has something to do with the 'summer 1/0' parameter and you are in control of the server, just try setting 'summer 0' in your server config and let's see if anything changes in the response to our query.
Let me know when I can try a new query.

Not working for you?
Don't forget to share the IP/ports of the offending server so that people can do tests and help you.
Oh, and if you're using a modified lgsl_protocol.php, make sure you disable the feed or it may NOT work!
Website
85filip58
Thu Jun 12 2014, 02:07AM

Posts: 125
Joined: Wed Aug 01 2012, 08:39AM
Registered Member #7331
M2MP\x14MPZona.CZ - Mafia 2\x020\x04100\x0AMPZona.CZ\x00\x01


This means:
M2MP - query
\x14MPZona.CZ - Mafia 2 - server name
\x020\x04100 - players
\x0AMPZona.CZ - gametype what i want in server settingsbecause i have mod with this name
\x00\x01 - something..

i am not sure if is possible to set summer in config




Head Admin of ServerList: www.GameW.eu
Website
Wussie
Thu Jun 12 2014, 02:07PM

Posts: 433
Joined: Sun Mar 22 2009, 06:53AM
Registered Member #4938
Exactly, it's all published by LGSL, except for the last 2 bytes.
The final '\x01' just means 'end of server response', while the '\x00' is still open for debate.

Let me know if you find out about the config, because I have no intention of ever playing this game or starting a server.

Not working for you?
Don't forget to share the IP/ports of the offending server so that people can do tests and help you.
Oh, and if you're using a modified lgsl_protocol.php, make sure you disable the feed or it may NOT work!
Website
85filip58
Fri Aug 29 2014, 03:45AM

Posts: 125
Joined: Wed Aug 01 2012, 08:39AM
Registered Member #7331
Hello Wussie, today i opened m2mp original script and i found this line:
$this->m_data[ 'summer' ] = (bool)$binary[ $offset ];

this, means that is on the server summer 1 or 0 can you please find any solution how to add this in the LGSL mafia 2 query code as possible?

See too this:

Head Admin of ServerList: www.GameW.eu
Website
Wussie
Fri Aug 29 2014, 04:52PM

Posts: 433
Joined: Sun Mar 22 2009, 06:53AM
Registered Member #4938
Today I was able to find a passworded server and I can confirm that my code above shows password=1 correctly.
I can also confirm that servers do NOT report any information about 'summer'.
All servers listed by game-state.com show summer=1 but I suspect it has nothing to do with the actual server responses. It looks more like the webmaster at game-state.com decided to arbitrarily display summer=1 for all servers regardless.

If it means so much to you, I guess you could add this line
$server['e']['summer'] = 1;
add it AFTER this
$server['s']['password'] = ord(lgsl_cut_byte($buffer, 1));


Of course the server response has nothing to do with this, so you may as well add
$server['e']['how do we know this?'] = 'because 85filip58 said so';

Happy?

Not working for you?
Don't forget to share the IP/ports of the offending server so that people can do tests and help you.
Oh, and if you're using a modified lgsl_protocol.php, make sure you disable the feed or it may NOT work!
Website
85filip58
Sat Aug 30 2014, 02:14AM

Posts: 125
Joined: Wed Aug 01 2012, 08:39AM
Registered Member #7331
Then you mean that this: $this->m_data[ 'summer' ] = (bool)$binary[ $offset ]; in the m2mp class is only fake? Then its most funny, ok wussie i understand, i know how to add fake summer like this: $server['e']['summer'] = 1; okay, thanks for your time

Head Admin of ServerList: www.GameW.eu
Website
Wussie
Sat Aug 30 2014, 09:10AM

Posts: 433
Joined: Sun Mar 22 2009, 06:53AM
Registered Member #4938
Is it fake? I don't know...
What is this "m2mp original script", can I see it? Maybe if I take a look I can see what it's about. Send me the script or a link where I can see it, but make sure it contains the word 'summer' somewhere.

Until then, in the absence of some evidence that servers do report 'summer', I have to consider the possibility that it's fake yeah.

Not working for you?
Don't forget to share the IP/ports of the offending server so that people can do tests and help you.
Oh, and if you're using a modified lgsl_protocol.php, make sure you disable the feed or it may NOT work!
Website
85filip58
Sat Aug 30 2014, 03:54PM

Posts: 125
Joined: Wed Aug 01 2012, 08:39AM
Registered Member #7331
With my script is possible set Map name or gamemode text like this:
setGameModeText( modname ); // Set gamemode text
setMapName( "Empire Bay" ); // Set map name


but Squirrel (scripting of plugins for m2mp) don't support set summer, but i need it only that is set summer in the m2mp class, if is this impossible then i only add $server['e']['summer'] = 1; and its OK.

Head Admin of ServerList: www.GameW.eu
Website
 

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