Vanish
Moved
Total Downloads: 22,662 - First Release: Nov 3, 2015 - Last Update: Jan 9, 2018
- 5/5, 75 likes
-
-
Wulf Community Admin
-
I added in this line
Code:ConsoleNetwork.BroadcastToAllClients("chat.add", 0, $"{player.displayName} has disconnected. (Disconnected)", 1.0);
Code:void Disappear(BasePlayer player) { // Destroy player/item entities var connections = new List<Connection>(); foreach (var basePlayer in BasePlayer.activePlayerList) { if (player == basePlayer || !basePlayer.IsConnected()) continue; if (visibleToAdmin && IsAdmin(basePlayer)) continue; connections.Add(basePlayer.net.connection); } if (Net.sv.write.Start()) // Try catch? { Net.sv.write.PacketID(Message.Type.EntityDestroy); Net.sv.write.EntityID(player.net.ID); Net.sv.write.UInt8((byte)BaseNetworkable.DestroyMode.None); Net.sv.write.Send(new SendInfo(connections)); } var item = player.GetActiveItem(); if (item?.GetHeldEntity() != null && Net.sv.write.Start()) { Net.sv.write.PacketID(Message.Type.EntityDestroy); Net.sv.write.EntityID(item.GetHeldEntity().net.ID); Net.sv.write.UInt8((byte)BaseNetworkable.DestroyMode.None); Net.sv.write.Send(new SendInfo(connections)); } // Add overlay effect if enabled if (showOverlay || showIndicator) VanishGui(player); // Set max vanish time if enabled if (vanishTimeout > 0f) timer.Once(vanishTimeout, () => { if (!onlinePlayers[player].IsInvisible) return; PrintToChat(player, Lang("VanishTimedOut", player.UserIDString)); Reappear(player); }); // Save and notify PrintToChat(player, Lang("VanishEnabled", player.UserIDString)); ConsoleNetwork.BroadcastToAllClients("chat.add", 0, $"{player.displayName} has disconnected. (Disconnected)", 1.0); rust.RunServerCommand($"grant user {player.userID} playerlist.hide"); onlinePlayers[player].IsInvisible = true; Subscribe(nameof(CanNetworkTo)); } object CanNetworkTo(BaseNetworkable entity, BasePlayer target) { var player = entity as BasePlayer ?? (entity as HeldEntity)?.GetOwnerPlayer(); if (player == null || target == null || player == target) return null; if (visibleToAdmin && IsAdmin(target)) return null; // Hide from other players if (IsInvisible(player)) return false; return null; }
or a way in the future you could add this in? -
Wulf Community Admin
-
ok i was trying to get it to match plugin ConnectMessages where it only displays there name on logoff from server with out displaying the server clan tags.
-
Wulf Community Admin
-
-
Wulf Community Admin
-
@Wulf Could you make a way that admins can tell if other admins/mods are in vanish? maybe like a glow effect that only admins can see or maybe changes there name to [Vanished] <name>
-
Wulf Community Admin
-
-
I tested out if the helicopter could see me, but that side seems to work, it circled closely to me when I was shooting it in vanish mode, but only chucked out rockets a few times in the general vicinity not really directly at me.
Anyway, could it be that there is some sort of plugin incompatibility without it showing in the oxide log?
-----------------------------------------------------
EDIT: also: vanish does a fantastic job at preventing damage from the environment, e.g. those heli rockets, traps. -
Wulf Community Admin
-
It was the admin visibility setting, even though my friend logged in without elevated privileges to test it. I am absolutely certain he wasn't admin and he could see me - I double checked the console output when he logged in, he wrote in chat and tried noclip etc. Could it be, that for some reason he was still flagged as admin to oxide/the plugin? or what would cause something like this? -
Wulf Community Admin
-
Thanks and pardon me for wasting your time! -
it is possible to bind a key for that ? thx
-
Wulf Community Admin
bind KEY COMMAND -
@Wulf is there any progress in possibly getting this changed to permissions? I really want my admins and mods to have different permissions.