Cad

Member
Hello,
Just looking for some guidance on how to make an item that is always invisible like XmlSpawner for example, only visible to AccessLevel.Administrator?
Thank you.
 
Look at the properties for any spawner, the hidden property hides it from players but allows admins to see it.
 
That's what makes this difficult, I want to set this item only visible to Admin and higher. I don't want GMs, players ETC to see them.
 
Hey,
I think if you overwrite the following method (in your item) with this it should do the trick:

C#:
public override void SendInfoTo(NetState state, bool sendOplPacket)
{
    if (state.Mobile != null && state.Mobile.AccessLevel >= AccessLevel.Administrator)
        base.SendInfoTo(state, sendOplPacket);
}
 
  • Love
Reactions: Cad
Hey,
I think if you overwrite the following method (in your item) with this it should do the trick:

C#:
public override void SendInfoTo(NetState state, bool sendOplPacket)
{
    if (state.Mobile != null && state.Mobile.AccessLevel >= AccessLevel.Administrator)
        base.SendInfoTo(state, sendOplPacket);
}
oooh, where would this go? I'm trying to make it so GMs cant see hidden Faction traps only Admins +.
Thank you
 

Attachments

  • BaseFactionTrap.cs
    9.8 KB · Views: 2

Active Shards

Donations

Total amount
$0.00
Goal
$1,000.00
Back