Vanish

Moved

Total Downloads: 22,662 - First Release: Nov 3, 2015 - Last Update: Jan 9, 2018

5/5, 75 likes
  1. Any word on having seperate configs for admin vs moderators?
     
  2. Right, I didn't expect that. But other players still see me and my shadow, no matter if they are admin or not. They only see the puff of smoke but I remain visible...
     
  3. Wulf

    Wulf Community Admin

    I started it, just haven't finished yet. Likely be switching to permissions vs. config.

    I don't see how that's possible. If they can see you, you either are not vanished, or they are admin and the "VisableToAdmin" is enabled in the config. The only other possibility is you have another plugin handling something similar and is conflicting, which you'd see in your oxide/logs.
     
  4. I added in this line
    Code:
                ConsoleNetwork.BroadcastToAllClients("chat.add", 0, $"{player.displayName} has disconnected. (Disconnected)", 1.0);
    
    to here
    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;
            }
    Is there a way to make it say the player name instead of the display name because the display name shows clan tags.

    or a way in the future you could add this in?
     
  5. Wulf

    Wulf Community Admin

    There only is one name. The display name is their name. If tags are added to their name, they are part of their name.
     
  6. 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.
     
  7. Wulf

    Wulf Community Admin

    ConnectMessages is a universal plugin that stores in a separate location. Vanish is a game-specific plugin. It is possible to grab their normal name, but there is no guarantee that will be any different, as there are universal Clan plugins as well.
     
  8. ok thanks i just did not know if there was a way to strip the clan tag from there thanks.
     
  9. Wulf

    Wulf Community Admin

    Most plugins add the tag to their actual name, so it wouldn't be reliable. I can add an optional disconnection message if you'd like though. :p
     
  10. @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>
     
  11. Wulf

    Wulf Community Admin

    Yes, that's doable.
     
  12. Yes i would like that also a connect if you could for now i added in for playerlist to hide them also if that possable
     
  13. uhm... I double checked just now, and there's nothing in the log.
    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.
     
  14. Wulf

    Wulf Community Admin

    Sure, added to the TODO.

    Not really, there'd be hook conflict warnings if there was an incompatibility.
     
  15. well, thanks again for your suggestions. I've figured it out, even though it still baffles me:
    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?
     
  16. Wulf

    Wulf Community Admin

    The plugin checks if he is set with auth level 1 or 2 or in the Oxide admin group.
     
  17. man, do I feel silly now. I must have set that when I was just starting to play around with oxide and wasn't aware that oxide had a dedicated admin group.
    Thanks and pardon me for wasting your time!
     
  18. it is possible to bind a key for that ? thx
     
  19. Wulf

    Wulf Community Admin

    Sure, bind it as you normally would with the command.

    bind KEY COMMAND
     
  20. @Wulf is there any progress in possibly getting this changed to permissions? I really want my admins and mods to have different permissions.