Stop server from restarting map when second player joins?

Re: Stop server from restarting map when second player joins

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

Senshi wrote: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.

Thanks for the additional info. I looked for soldier.inc and wasn't able to find it. Were you referring to the files in "bf1942/game/common"? They are "AmericanNames.con", etc. If so, presumably I would have to add the setting to all five of those files.

Would the server executable need to be patched to allow this? I'm referring to the patch tuia found for freddy that eliminates restrictions on otherwise restricted commands like "game.killPlayer" (see above).
User avatar
jrivett
 
Posts: 15
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.
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 » Thu Apr 04, 2013 6:43 pm

Senshi wrote: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.

Woot! It works. You guys are awesome.

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

Re: Stop server from restarting map when second player joins

Postby Waldek » Wed Apr 10, 2013 8:40 pm

tuia wrote: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.


Okay, I've found and edited this value, but I've got another problem. In BFSM I created a custom ingame command - !kill - by addings this line to PlayerMenu.con:

Code: Select all
Console Commands>"game.killPlayer %bfid"|cmd,[kill]


sadly this seems to work only for users that have full admin access rights. For the rest of them the BFRM says "Command failed. User XXXXX is not authorised to issue console commands." , while rest of admin commands works fine. I don't understand this :cry: At this moment the only real way of using game.killplayer command is running the slow remote console, what is not very handy.
Waldek
 
Posts: 49
Joined: Thu Mar 08, 2012 12:09 pm

Postby freddy » Wed Apr 10, 2013 9:51 pm

My admins can issue console commands, most of them have rights limited to the "Players" thing in bfrm
User avatar
freddy
 
Posts: 1222
Joined: Sun Oct 18, 2009 4:58 pm

Re: Stop server from restarting map when second player joins

Postby Waldek » Wed Apr 10, 2013 10:40 pm

Actually I've found the reason. The "User can issue console commands" option was not enabled for every individual BFRM user :lol: Thanks Tuia and Freddy

EDIT:
BTW, are there other useful commands enabled by that hack?
Waldek
 
Posts: 49
Joined: Thu Mar 08, 2012 12:09 pm

Re: Stop server from restarting map when second player joins

Postby reegad » Sun Apr 29, 2018 9:34 am

tuia wrote: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.


Did you ever find a fix for this command for linux servers?
Console Commands>"game.killPlayer %bfid"|cmd,[kill]
Image
reegad
 
Posts: 70
Joined: Mon Nov 09, 2009 3:43 pm

Previous

Return to Battlefield server and client

Who is online

Users browsing this forum: No registered users and 8 guests