AutomaticAuthorization

Add your friends list or clan mates to a cupboard or turret auth list using 1 command

Total Downloads: 3,381 - First Release: Aug 12, 2016 - Last Update: Dec 10, 2017

5/5, 14 likes
  1. No I was just more curious, I've installed it, seems to be working fine.
     
  2. I think it's already been stated, and fujikura has a paid plugin that does solves the problem. But, I think most players are looking for an option to auto authorize all previously existing cupboards, etc, while their friends are offline, or not known yet. This plugin doesn't seem to solve that issue.
     
  3. When the command is used on a toolcupboard, it says access was granted, and when you look at the cupboard is shows the option to de-auth (signifying it has worked) yet me (and my clan) remain building blocked. Any ideas?
     
  4. I believe this broke on update?
     
  5. Wulf

    Wulf Community Admin

    Are you getting any errors?
     
  6. line 184
    replace for this:

    if (player.IsAdmin || permission.UserHasPermission(player.UserIDString, "automaticauthorization.use"))
     
  7. Wulf

    Wulf Community Admin

    Wulf updated AutomaticAuthorization with a new update entry:

    0.1.8

     
  8. Please tell me how to add authorization in the doors?
     
  9. (22:26:33) | Exception while calling NextTick callback (NullReferenceException: Object reference not set to an instance of an object)

    Turrets are still targetting players
     
  10. @k1lly0u Hey k1ll, is there a command where players can just authorize their clan on ALL of their cabinets at once instead of having to look at each and every cabinet? Thanks!
     
  11. [Error] Error while compiling: AutomaticAuthorization.cs(163,24): error CS1061: Type `AutoTurret' does not contain a definition for `authorizedPlayers' and no extension method `authorizedPlayers' of type `AutoTurret' could be found. Are you missing an assembly reference?
     
  12. Wulf

    Wulf Community Admin

    I'm putting out another build to make the field public again in Rust. It was changed to private in the Rust update.
     
  13. anyway to make this so it auts on all tcs not just 1
     
  14. Im working on this now, just a bit stuck, it detects all tcs and turrets in 30m radius, but only returns 1 object, how would I go about to get it to return multiple objects found ? Cheers.

    Code:
            private BaseEntity FindEntity(BasePlayer player)
            {
                var currentRot = Quaternion.Euler(player.serverInput.current.aimAngles) * Vector3.forward;
                Vector3 eyesAdjust = new Vector3(0f, 1.5f, 0f);
                int radius = 30;            //var rayResult = Ray(player.transform.position, eyesAdjust);
                var rayResult = Sphere(player.transform.position, radius);
                if (rayResult is BaseEntity)
                {
                    var target = rayResult as BaseEntity;
                    return target;
                }
                return null;
            }        private object Sphere(Vector3 Pos, int radius)
            {
                var hits = Physics.OverlapSphere(Pos, 30);
                object target = null;            foreach (var hit in hits)
                {
                    if (hit.GetComponentInParent<BaseEntity>() != null && hit.ToString() == "assets/prefabs/deployable/tool cupboard/cupboard.tool.deployed.prefab (UnityEngine.BoxCollider)" || hit.GetComponent<AutoTurret>())
                    {
                            target = hit.GetComponentInParent<BaseEntity>();
                            PrintWarning("Object found: " +target.ToString());                       
                    }
                }
                return (target);
            }
     
  15. Wulf

    Wulf Community Admin

    How can I Raycast to multiple objects - Unity Answers
     
  16. I already have the functionality of a raycast, using a sphere colider, it does find the objects in the area, but only passes 1 target ("return target"). I am basically too rusty on coding alltogether to figureout how to pass multiple objects in a return type function.

    Optimistically I want something like this:

    Code:
            private object Sphere(Vector3 Pos, int radius)
            {
                var hits = Physics.OverlapSphere(Pos, 30);
                object target = null;
                int i = 0;            foreach (var hit in hits)
                {
                    if (hit.GetComponentInParent<BaseEntity>() != null && hit.ToString() == "assets/prefabs/deployable/tool cupboard/cupboard.tool.deployed.prefab (UnityEngine.BoxCollider)" || hit.GetComponent<AutoTurret>())
                    {
                            target = hit.GetComponentInParent<BaseEntity>();
                            PrintWarning("Object found: " +target.ToString());                     
                            PrintWarning("No. obj found: " +i.ToString());
                            i++;
                            return target; //<---------- I expect it to return all objects found, but it returns only 1
                    }
                }
                //return (target); // <----- Same if I return here
            }
     
    Last edited by a moderator: May 10, 2017
  17. Is anyone having an issue where turrets that have had players autoauthd will still target those players?
     
  18. okay so got this plugin all set up and a player contacted me and said that when they auth there friends and clan on the tc they are still getting killed by shotgun traps ect is this a bug?
     
  19. My current friend list is 3 people, 6 was before.
    When im trying to use /autoauth friends command its add 6 people instead of 3.
    Its Friend api problem or automaticauthorization plugin?
     
  20. Can you add individual friends?