Hello there,
I've been trying to work on my own little custom HUD for the past day or so, and I was wondering how I could personify it to the extent where the program would be able to detect the name of the player who was wearing the glasses, then being able to display it on the HUD. I have no idea on how this would be achieved, hence why I came here.
I'd appreciate any help here.
0
Terminal Glasses - grabbing playername and displaying on HUD
Started by xNightmare, Jun 17 2015 05:22 PM
lua peripheral
4 replies to this topic
#1
Posted 17 June 2015 - 05:22 PM
#2
Posted 17 June 2015 - 06:52 PM
There is indeed a method that allows you to get a list of all connected players (however, I cannot remember). It returns an array of all players with the terminal glasses equipped. The command event also includes a player argument, which allows you to know which player issued a certain command. It is however impossible to make a player-specific HUD using only one Terminal Glasses Bridge, you would need multiple to do so.
#3
Posted 18 June 2015 - 12:50 AM
Pretty sure it's possible. The "Plastic" program seems to cue the player by name.
#5
Posted 23 July 2015 - 10:47 PM
Hello there !
To detect the name of the player(s) who wearing the Terminal Glasses you need to call this fonction :
Users is the array containing the player name.
Glasses is the T. Glasses object.
I hope this helps
To detect the name of the player(s) who wearing the Terminal Glasses you need to call this fonction :
Users = Glasses.getUsers()
Users is the array containing the player name.
Glasses is the T. Glasses object.
I hope this helps
Edited by RootSlayers, 23 July 2015 - 10:47 PM.
1 user(s) are reading this topic
0 members, 1 guests, 0 anonymous users