I'd like to hide player name tags on my server, to make the game more realistic
(We dont walk around with nametags in real life )
I found the below server command, but it doesnt seem to be working:
nametags.enabled false
is this an outdated command?
is there a plugin that can hide name tags?
References:
- Server Commands
"nametags.enabled no description True Boolean"
- We need an option to hide nametags. • /r/playrust (2015)
"garryjnewman Garry! 8 points 1 year ago nametags.enabled false"
- Request - Invisible name tag | Oxide (2014)
Rust Disable overhead name tags
Discussion in 'Plugin Requests' started by DontGetJacked, Jan 27, 2017.
-
Wulf Community Admin
The name tag in Rust is based on range, which is handled by the client, not the server. So it's unlikely you'd be able to change it. I believe each client would have to run that command if it still exists, as it's a client-command, not a server command as far as I know.
-
Hmmm, would this plugin be helpful?
http://oxidemod.org/plugins/automatic-client-commands.1894/
I wonder what the command would be that would need to run on the client side -
Wulf Community Admin
-
-
I think it would be possible to periodically loop through active player list and run command every X seconds?
-
Wulf Community Admin
-
-
Wulf Community Admin
-
-
Wulf Community Admin
-
-
Untested, would this work?
Code:private Timer _timer;void Init() { _timer = timer.Repeat( 5, 0, () => { foreach (var player in BasePlayer.activePlayerList) player.SendConsoleCommand("nametags.enabled false"); }); }void Unload() { if (!_timer.Destroyed) _timer.Destroy(); }
-
You shouldn't need to destroy the timer. As it seems to auto-destroy when the plugin itself unloads. Of course you can take these precautions if you wish. And you can stuff that repeat function within loaded as well. I would personally just make a separate function to do it(personally to keep the code cleaner/neat).
Code:void Loaded() { Repeat_Function(); } void Repeat_Function(){ timer.Repeat(5, 0, () => { //Debug Puts("Debug"); //Debug foreach (var player in BasePlayer.activePlayerList){ player.SendConsoleCommand("nametags.enabled false"); } }); }
-
Wulf Community Admin
-
-
You are complete right, that could become really crazy.
Some game functions need simply to be taken like they are provided. -
Wulf Community Admin
-
Would it be possible to only run that automatic client commands script during an event? I would like all clients to disable name tags while in the slasher event, then re-enable (if it was enabled prior) after the event.