Having trouble using hooks in plugin
Hey try in to create zone and add flags from my plugin did Ref plugin and added this to command
ZoneManager.Call("CreateOrUpdateZone", "Jail", "radius", "10");
            ZoneManager.Call("AddFlag", "Jail", "autolights");
            ZoneManager.Call("AddFlag", "Jail", "nodecay");
            ZoneManager.Call("AddFlag", "Jail", "undestr");
​

but maybe i dont understand how to do this right any help?

| Failed to call hook 'TestCommand' on plugin 'NooBhub v0.2.0' (NullReferenceException: Object reference not set to an instance of an object)
  at Oxide.Plugins.NooBhub.TestCommand (Oxide.Core.Libraries.Covalence.IPlayer iplayer, System.String command, System.String[] args) [0x00000] in <2daffded8ef9442481cce33d137844a3>:0 
  at Oxide.Plugins.NooBhub.DirectCallHook (System.String name, System.Object& ret, System.Object[] args) [0x00d01] in <2daffded8ef9442481cce33d137844a3>:0 
  at Oxide.Plugins.CSharpPlugin.InvokeMethod (Oxide.Core.Plugins.HookMethod method, System.Object[] args) [0x00079] in <9affce1cd15c4ec183941adef8db1722>:0 
  at Oxide.Core.Plugins.CSPlugin.OnCallHook (System.String name, System.Object[] args) [0x000d8] in <4452f821def6406d834e4149849fe7ea>:0 
  at Oxide.Core.Plugins.Plugin.CallHook (System.String hook, System.Object[] args) [0x00060] in <4452f821def6406d834e4149849fe7ea>:0

and then all i get is a null Ref

ok so i figured out that the Refrence to ZoneManager I didnot do Correctly, so the null refrence was caused as my plugin did not reconize zonemanager as loaded , now that i got that working nothing happens when doing a call

this is what i got now.
        [PluginReference]
        private Plugin MarkerManager,ZoneManager;   ​
 void PasteJail(BasePlayer player)
        {
            Vector3 pos = new Vector3(-2622, 3, 2836);

            if (ZoneManager != null) // check if plugin is loaded
            {
                player.ChatMessage("ZoneManager is loaded ");
                ZoneManager.Call("CreateOrUpdateZone", "" , "name TheJail nodecay true autolights true undestr true", pos = default(Vector3));
            }
            else
            {
                player.ChatMessage("ZoneManager is not loaded");
            }
        }

but after tis call if i check zone_list no new zone was created? any suggestions?