1. Hi, what it's the solution of subj?

    I need players can unlock doors in some area, but can't pickup doors and codelocks or place their own code on door.
    There is no problem with rewriting codes on door on timer and spawning picked up codelocks, but the door still can be picked up and i can't respawn door.

    Tried to spawn door in doorway, but it's getting destroyed on spawn
    Code:
      door = GameManager.server.CreateEntity("assets/prefabs/building/door.hinged/door.hinged.toptier.prefab", <some Vector3()>, new Quaternion(), true);
      door.Spawn();
    Don't know how to restrict codelock picking up and Zones Manager flag "nopickup" is not an option because i need picking up in zone
     
  2. When you look into the doors code, there's the pickup check:
    Code:
    // Door
    public override bool CanPickup(BasePlayer player)
    {
        return base.IsOpen() && !base.GetSlot(BaseEntity.Slot.Lock) && base.CanPickup(player);
    }
    The first two conditions can't be really useful controlled from outside, but the last is the cool one of them:
    Code:
    // BaseCombatEntity
    public virtual bool CanPickup(BasePlayer player)
    {
        return this.pickup.enabled;
    }
    This leads to:
    Code:
    // BaseCombatEntity
    public BaseCombatEntity.Pickup pickup;
    there you got the bool "enabled".

    This should in conclusion help to fix your pickup problem...
     
  3. thanks, it's working now
     
  4. Your're welcome
     
  5. @wazzzup Did you manage to successfully spawn a door into a doorway? Because I'm currently struggeling at that point.
     
  6. as I remember, I haven't implemented the spawning, but denied picking up