Page 3 of 3

Re: Stop server from restarting map when second player joins

PostPosted: Wed Apr 03, 2013 2:27 pm
by jrivett
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).

Re: Stop server from restarting map when second player joins

PostPosted: Wed Apr 03, 2013 11:52 pm
by Senshi
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.

Re: Stop server from restarting map when second player joins

PostPosted: Thu Apr 04, 2013 6:43 pm
by jrivett
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!

Re: Stop server from restarting map when second player joins

PostPosted: Wed Apr 10, 2013 8:40 pm
by Waldek
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.

PostPosted: Wed Apr 10, 2013 9:51 pm
by freddy
My admins can issue console commands, most of them have rights limited to the "Players" thing in bfrm

Re: Stop server from restarting map when second player joins

PostPosted: Wed Apr 10, 2013 10:40 pm
by Waldek
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?

Re: Stop server from restarting map when second player joins

PostPosted: Sun Apr 29, 2018 9:34 am
by reegad
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]