Jump to content
Sign in to follow this  
igneous01

user input dialog for text - ask for password in game

Recommended Posts

Ive been looking for commands and a solution to get a dialog box to show up that prompts user input for a password.

but i havnt found anything like this, even a sidechat password would be good.

basically theres gonna be a custom hanger inside a domi server, where special equipment will be stored, and the doors locked.

once someone goes near the hanger an action will show up saying give password or something like that.

then you need to type in the password (either dialog box or sidechat) and if it matches the one stored in the script then the doorlock script will end and the user can go inside the hanger.

is there a way to get user input in game?

Share this post


Link to post
Share on other sites

Hello,

i also have a need for this. Basicly i want the player to be able to enter his own callsign via an addAction:

- Player gets to some object having the action available (Commander unit etc)

- ActionMenu -> "Change callsign"

- Input box opens

- text from input box is then stored to variable which in turn is used as argument for setGroupId

---------- Post added at 10:26 ---------- Previous post was at 10:23 ----------

Hello, however i was not able to find infos on that until a few seconds ago, i now found this in the Biki:

http://community.bistudio.com/wiki/Dialog_Control#Text

Maybe that helps, i will try that out.

Share this post


Link to post
Share on other sites

What about requiring a Password to play in a player slot, is this possible?

Share this post


Link to post
Share on other sites
What about requiring a Password to play in a player slot, is this possible?

no. its not possible.

all you can do here is make a function that auto kick people when the join and selected wrong slot. only allow it for some uid's

Share this post


Link to post
Share on other sites
no. its not possible.

all you can do here is make a function that auto kick people when the join and selected wrong slot. only allow it for some uid's

Can you provide an example?

Share this post


Link to post
Share on other sites

you should be able to do something like that using onPlayerconnected command..

something along this lines.

OnPlayerConnected "[_uid,_name] execVM ""checkslot.sqf""";

_uid = _this select 0;
_name = _this select 1;
_slot1 = ["123456","654321","321654"];
if ((isplayer wslot1) and not (_uid in _slot1)) then 
{
   serverCommand Format["#kick %1",_name];
};

assuming there is a playable unit named wslot1.

this is not tested so i cant say for sure if it just works just like that. play a little with it.

Share this post


Link to post
Share on other sites

Please sign in to comment

You will be able to leave a comment after signing in



Sign In Now
Sign in to follow this  

×