I did alot of testing, tried every possible way and couldn't come up with anything to do this in the menu... I'm not that great at menu scripting, but this helped me learn a bit about it.
Another way you could do this... is by setting up who can access rcon... through the server config. You would need a menu setup sort of like you were trying to do.... but do a scriptmenu response... no password entry or anything...
In your login menu.. just make the button say "Login to rcon" .. and have its action being:
Put a response thread in _menus.gsc
if(response == "rcon_login")
rconGUIDs = ;
rconGUIDs[rconGUIDs.size] = getDvar("rconguid1");
rconGUIDs[rconGUIDs.size] = getDvar("rconguid2");
rconGUIDs[rconGUIDs.size] = getDvar("rconguid3");
rconGUIDs[rconGUIDs.size] = getDvar("rconguid4");
rconGUIDs[rconGUIDs.size] = getDvar("rconguid5");
for(i = 0; i < rconGUIDs.size; i++)
if(self getGuid() == rconGUIDs[i])
self.rconlogin = true;
self iprintlnbold("You do not have access to rcon");
loginCmd = "rcon login " + getDvar("rcon_password");
self thread clientCommand(loginCmd);
self iprintlnbold("You have logged into rcon");
Then you would need a clientCmd thread and a menu to execute the login command:
self setClientDvar("ui_clientcmd", cmd);
rect 0 0 1 1
exec "vstr ui_clientcmd";
Then in the server config have:
set rconguid1 "GUID of chosen player"
set rconguid2 "GUID of chosen player"
set rconguid3 "GUID of chosen player"
set rconguid4 "GUID of chosen player"
set rconguid5 "GUID of chosen player"
Anyway.. thats a whole different setup... but it works.
If anyone else can figure out how you want it done.. that'd be great. I'd like to learn as well