PrivateZones

Add permissions to zones to keep them private

Total Downloads: 597 - First Release: Feb 14, 2016 - Last Update: Feb 20, 2017

5/5, 5 likes
  1. Can we make a PVP zone on a PVE server with this mod or do we need something else? Thank you
     
  2. So does this work with group permissions? Like this privatezone only allows GroupA to enter?
    If I made a group called faction, how would I setup the permission for zone so only 'faction' could enter? Would it be:

    /pz.add 1234 faction

    ?
     
  3. If the user doesnt have the permission they will be ejected from the zone. You can apply permissions to groups by typing "grant group <groupname> <permission>" in console
     
  4. Ok, I see, so I would
    I understand Oxide permissions, but please pardon my ignorance as I do not understand how I would create a zone permission for a specific group. That is, how to make a zone so only players who are part of a particular group would be able to enter the zone.
    I create the group, add players to the groups, but how does one run the command for the zone using your mod? How do I create a "permission" for that group?
     
  5. Create the zone like you normally would in ZM, then use this to apply a permission to your newly created zone. Then grant that group the permission
     
  6. Ok, bear with me. I 200% appreciate the fact you've taken time out of your day to answer my stupid questions twice, but apparently I'm just extremely dense, or I just don't have a good grasp on Oxide permissions.

    How do I create a "permission". Is it arbitrary? Do I just tell Oxide/Rust that hey there is this new random permission called "X" and GroupA has permission "X"?

    Could you run me by the Oxide console command to create a permission? I know how to create groups, and I know how to apply pre-existing permissions to those groups, that is, permissions that were created by developers that exist within their mods. But I myself, do not know how to create a permission. I looked at "Using Oxide's Permissions" but I did not find any information in regards to CREATING a permission, just how to apply a permission to a group or user.

    Again, thank you for your time, for all your awesome mods and I apologize for my stupidity in, what I gather, is a very simple matter.
     
    Last edited by a moderator: Sep 3, 2016
  7. This plugin creates the permission. Say your zone ID is 1234, and you want your perm called vip, type "/pz add 1234 vip"
    The plugin has just created a new permission called "privatezones.vip" which you must grant to players for them to be able to enter the zone with the id '1234'
     
  8. Thank you for laying it out for me plainly, sorry for my derpness.
    Much obliged kind sir.
     
  9. I LIED. Sorry. I actually have one more question.
    Is it possible to apply multiple permissions to a zone, or can each 'private zone' only have one permission associated with it?
    E.G.
    GroupA has permission
    GroupB has permission
     
  10. Getting this, however haven't experienced any negative feedback from players so don't know what this is all about. However, just FYI.
    Code:
    18:23 [Error] Failed to call hook 'cmdPZ' on plugin 'PrivateZones v0.1.3' (ArgumentException: An element with the same key already exists in the dictionary.)
    18:23 [Debug]   at System.Collections.Generic.Dictionary`2[System.String,System.String].Add (System.String key, System.String value) [0x00000] in <filename unknown>:0
      at Oxide.Plugins.PrivateZones.cmdPZ (.BasePlayer player, System.String command, System.String[] args) [0x00000] in <filename unknown>:0
      at Oxide.Plugins.PrivateZones.DirectCallHook (System.String name, System.Object& ret, System.Object[] args) [0x00000] in <filename unknown>:0
      at Oxide.Plugins.CSharpPlugin.InvokeMethod (HookMethod method, System.Object[] args) [0x00000] in <filename unknown>:0
      at Oxide.Core.Plugins.CSPlugin.OnCallHook (System.String name, System.Object[] args) [0x00000] in <filename unknown>:0
      at Oxide.Core.Plugins.Plugin.CallHook (System.String name, System.Object[] args) [0x00000] in <filename unknown>:0
     
  11. Hey man, do you know if you can make it granular enough to let the default group enter but not build, then have another group with the permission to build? At the moment if I apply this to a zone, no one can enter without being in a permission group. I just wanna be able to whitelist people to build in the town without a cupboard, thanks.
     
  12. read ZoneManager overview - try to focus on permission ;)
     
  13. @k1lly0u Can you tweak this to allow for it to be used in deathmatches? When people initially spawned on my island for the dm it was fine but when they died and tried to respawn it would throw them out of the bubble which would then mean the destruct thing from the deathmatch would kill em in a loop. Gonna have to throw walls up
     
    Last edited by a moderator: Nov 5, 2016
  14. @k1lly0u
    Your plugin have problems since recent updates.
    The plugin works only very rarely, no error message. As you can see on my video (sorry for lag, stream + rust ...).
     
  15. Code:
    (13:21:59) | Error while compiling PrivateZones.cs(56,20): error CS1061: Type `BasePlayer' does not contain a definition for `TransformChanged' and no extension method `TransformChanged' of type `BasePlayer' could be found. Are you missing an assembly reference?
     
  16. k1lly0u updated PrivateZones with a new update entry:

    0.1.4

     
  17. Perhaps you can make a config for this to allow us to alter values within the plugin, as well as maybe adding a few.

    Just a mock-up example:

    Code:
    //enable a set position to teleport players to if they try to enter a certain zone
    setposition="true",//if a set teleport location is not set, this is how far back the player will be pushed back
    distance="10",//should the player be changed to sleeping state after being pushed back?
    sleeping="false",//sound played when a player tried to enter a zone they don't have permission in
    sound="assets/prefabs/instruments/guitar/effects/guitarpluck.prefab",
    
    Also there's a strange thing that happens if a player in teleported away from a zone, towards a foundation. They end up inside or under the foundation. Is there anyway to make it so they teleport on top of it? Or maybe allow a setting to where we can dictate how high from the world the player will be teleported back.

    Another idea... Would it be easy to make it so you don't have to target a zone's ID number, but allow you to target the name of the zone instead. It get's a little tedious to have to type those numbers in every time there's a wipe.
     
  18. is there any way to grant NPCs permission to be in a private zone
     
  19. Hey, I have a really kind of big suggestion to add to this plugin, or perhaps its own plugin.
    I would pay for this plugin (you should make it and put it on chaoscode)
    Here is the post

    I haven't looked into how the zone would work now that there is Building 3.0 and cupboard radius is dynamic, but im sure we could figure the best way out.

    If you check that post out, I appreciate it! Thanks