OFPEC Forum

Editors Depot - Mission Editing and Scripting => OFP - Editing/Scripting Multiplayer => Topic started by: CosmicEvo on 23 Jun 2003, 21:43:40

Title: Scripting for Admin Only? Possible?
Post by: CosmicEvo on 23 Jun 2003, 21:43:40
Hey,

    This is probably stretching it a bit, but does anyone know if there is some way for a script to know who the server admin is in a MP game.  I want to give server admin a dialog screen of additional options in my CTI game, but don't want to force them into a set player slot.

     Or maybe just which side the admin is playing on, so he can be EAST, WEST, Res., or Civilian ---  and not just West player #1....  If it is possible, please tell me how....  (Though I will probably make it so that first west player decides on these options if the selection is made for admin choice.)

P.S. I already use the two listbox parameters in the team selection screen for time limit and starting credits.
Title: Re:Scripting for Admin Only? Possible?
Post by: Tactician on 25 Jun 2003, 01:27:26
?(name player == "Admin's Name"): [] exec "adminscript.sqs"

Of course you have to change the mission when an admin comes/goes.

You can also add a password check to prevent people from spoofing the system by using an admin's name.  Since you seem to know about dialogs, try a text box that checks the input string against a password string in the script.  If the password is wrong three times, put that player in a seperate group and createUnit a gameLogic to his group to crash him :)