[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 112: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 112: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 112: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 112: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/functions.php on line 4871: Cannot modify header information - headers already sent by (output started at [ROOT]/includes/functions.php:3887)
[phpBB Debug] PHP Warning: in file [ROOT]/includes/functions.php on line 4873: Cannot modify header information - headers already sent by (output started at [ROOT]/includes/functions.php:3887)
[phpBB Debug] PHP Warning: in file [ROOT]/includes/functions.php on line 4874: Cannot modify header information - headers already sent by (output started at [ROOT]/includes/functions.php:3887)
[phpBB Debug] PHP Warning: in file [ROOT]/includes/functions.php on line 4875: Cannot modify header information - headers already sent by (output started at [ROOT]/includes/functions.php:3887)
Battlefield 1942 Mods, Modding Tutorials. Forums and Mod Downloads. • View topic - Stop server from restarting map when second player joins?

Stop server from restarting map when second player joins?

Re: Stop server from restarting map when second player joins

Postby tuia » Thu May 24, 2012 11:03 pm

It's not documented here in the public forum, freddy asked me to patch the server executable, so that some commands, like game.killPlayer could be run.
You need to go to 0x00558268 address or 0x00158268 offset and change the byte value 75 to EB and save the file. After that, typing those commands from the server console won't prompt the "Unauthorized method" error message and they will be executed.
tuia
 
Posts: 129
Joined: Tue Sep 06, 2011 12:36 pm
Location: Lisbon, Portugal

Re: Stop server from restarting map when second player joins

Postby jrivett » Fri May 25, 2012 12:01 am

Ok, thanks!
User avatar
jrivett
 
Posts: 16
Joined: Sat Nov 26, 2011 8:03 pm
Location: Vancouver, Canada

Re: Stop server from restarting map when second player joins

Postby freddy » Fri May 25, 2012 4:55 am

User avatar
freddy
 
Posts: 1247
Joined: Sun Oct 18, 2009 4:58 pm

Re: Stop server from restarting map when second player joins

Postby tuia » Sun Jun 17, 2012 12:42 pm

freddy, is right. You can add game.setMinNrOfPlayers 0 to your init.con inside your map .rfa file. It's cleaner and easier than patching the server executable. You'll have to add that command to all your map files, though.
tuia
 
Posts: 129
Joined: Tue Sep 06, 2011 12:36 pm
Location: Lisbon, Portugal

Re: Stop server from restarting map when second player joins

Postby jrivett » Sun Jun 17, 2012 2:35 pm

User avatar
jrivett
 
Posts: 16
Joined: Sat Nov 26, 2011 8:03 pm
Location: Vancouver, Canada

Re: Stop server from restarting map when second player joins

Postby jrivett » Thu Mar 14, 2013 4:35 pm

Tuia: I hate to be a bother, but is there any chance you could find the code to change in the Linux server? I recently switched to Linux hardware (finally), and people are already complaining that the second player to join restarts the current map. Alternatively, if there's a particular hex string or set of instructions I should look for, I should be able to figure out which byte to change based on what you've already said.

I'm running the version 1.61 dynamic Linux server with the patches you already provided to prevent hacks.

(crossing my fingers)
Thanks in advance!
Jeff
User avatar
jrivett
 
Posts: 16
Joined: Sat Nov 26, 2011 8:03 pm
Location: Vancouver, Canada

Re: Stop server from restarting map when second player joins

Postby tuia » Wed Mar 20, 2013 11:18 pm

Hi!

I did a quick check at BF1942 Linux server code and could not find it. I can't remember now how I found that function in BF1942 Windows server. This weekend I'll try to look further.
You can use "game.setMinNrOfPlayers 0" command in each of your map files as a temporary workaround.
tuia
 
Posts: 129
Joined: Tue Sep 06, 2011 12:36 pm
Location: Lisbon, Portugal

Re: Stop server from restarting map when second player joins

Postby Senshi » Wed Mar 20, 2013 11:35 pm

You can also add this line:
"game.setMinNrOfPlayers 0" to a basic common file that gets called for every map. Like the soldier.inc. That goes for every SSM modding/setting you want to apply for ALL maps.
My important tutorials:


Tools and stuff:

User avatar
Senshi
 
Posts: 695
Joined: Sun Oct 18, 2009 1:14 pm
Location: Germany

Re: Stop server from restarting map when second player joins

Postby jrivett » Wed Apr 03, 2013 2:27 pm

User avatar
jrivett
 
Posts: 16
Joined: Sat Nov 26, 2011 8:03 pm
Location: Vancouver, Canada

Re: Stop server from restarting map when second player joins

Postby Senshi » Wed Apr 03, 2013 11:52 pm

No need to edit the .exe .

Sorry, I gave you the wrong filename. Look for "objects\Soldiers\common\CommonSoldierData.inc" . That's a file that is called whenever a soldier is required (be it bot or player), so it allows to easily "hook" in commands that you want to apply universally.
My important tutorials:


Tools and stuff:

User avatar
Senshi
 
Posts: 695
Joined: Sun Oct 18, 2009 1:14 pm
Location: Germany

PreviousNext

Return to Battlefield server and client

Who is online

Users browsing this forum: No registered users and 3 guests