Stop server from restarting map when second player joins?

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: 14
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: 1232
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: 72
Joined: Mon Nov 09, 2009 3:43 pm

Re: Stop server from restarting map when second player joins

Postby Diamondback » Wed Jul 24, 2019 3:33 am

freddy wrote:i ran the command from file with the unpatched exe so it doesnt seems totally locked out, there seems to be some different access levels but there is not much documention to find about it. i guess reading from file is the highest "normal" access you can get.

mdt/scripting/Console/Properties/SetAccess.html
Code: Select all
c_totalAccess
 c_fullAccess
 c_endUserAccess
 c_noAccess

***************************************************************************************************************************************************************************************

what do you guys think about this, its supposed to be for bf42, i found it when i was googling around and i wonder if it have any substance to it, i dont have enough programming skills to determine if its meant just for bots or if it could be used to other things like perhaps a random event generator.

For the more advanced people i might to point out the undocumented <aiScript> class which is able to create scripts on the fly with nested expressions, even with subroutines.

aiScript.createScript 1 // start a new with id=1
aiScript.createScriptCommand ...
aiScript.createScriptVariable ...
aiScript.createScriptFlow ...
<complex statements, subroutines, expressions>
aiScript.endScript
aiScript.close
aiScript.runScript 1 // execute me


Reviving a dead thread here but the aiScript class of commands doesn't work in BF1942, only in BFV and BF2.
{SoH} Clan Leader // http://sohclan.forumotion.com/
See my Strasbourg map project here.
GSC: diamondback67
Steam: diamondback67
Diamondback
 
Posts: 486
Joined: Mon Oct 01, 2012 3:13 pm
Location: Canada

Previous

Return to Battlefield server and client

Who is online

Users browsing this forum: No registered users and 5 guests

cron