So i have. but what am i missing to hide the item from the player? not all players just the one ruining the command.
Code:Net.sv.write.PacketID(Network.Message.Type.EntityDestroy); Net.sv.write.EntityID(item.net.ID); Net.sv.write.UInt8((byte)BaseNetworkable.DestroyMode.None);
Hiding entity from single player?
Discussion in 'Rust Development' started by Ts3hosting, May 14, 2018.
-
Wulf Community Admin
I'd recommend looking at my Vanish plugin.
-
Thanks what i been trying that but i stuck.
i would assume this would hide the item form everyone the way this is but that does not happen.
Code:List<Connection> connections = new List<Connection>(); foreach (BasePlayer target in BasePlayer.activePlayerList) connections.Add(target.net.connection); Net.sv.write.PacketID(Network.Message.Type.EntityDestroy); Net.sv.write.EntityID(item.net.ID); Net.sv.write.UInt8((byte)BaseNetworkable.DestroyMode.None); Net.sv.write.Send(new SendInfo(connections));