1. so for example how would i say the ZoneManager external call
    Code:
    bool AddPlayerToZoneWhitelist(string ZoneID, BasePlayer player)
    bool isPlayerInZone(string ZoneID, BasePlayer player)
    
    i've tried these and more combinations. whats the correct way of calling this
    Code:
    [PluginReference]Plugin ZoneManager;
    ZoneManager?.Call("AddPlayerToZoneWhitelist","42752026", player);and
    if ( isPlayerInZone("92342343", player){}
    and
    bool test =  isPlayerInZone("92342343",player);
    
    cant seem to get it right someone show me the correct way to use this please. thanks
    [DOUBLEPOST=1435731484][/DOUBLEPOST]bool test =Convert.ToBoolean(ZoneManager?.Call("isPlayerInZone","42752026", player));
    that seems to work ^^ i think
     
  2. If you're trying to call another plugin, use the code below.

    Code:
    var ZoneManager = plugins.Find("ZoneManager")
    
    After you've got an instance of the plugin, you should be able to call a function for the plugin.
     
    Last edited by a moderator: Jul 1, 2015
  3. Code:
    var ZoneManager = plugins.Find("ZoneManager")
     
  4. Thank you for correcting my typo.
     
  5. so i got it to work with my last line of:
    Code:
    bool test =Convert.ToBoolean(ZoneManager?.Call("isPlayerInZone","42752026", player));
    but do i need to test it with the: var ZoneManager = plugins.Find("ZoneManager")
     
  6. Hey !

    I was wondering if there's a way to call a function from an external plugin which is in lua when my plugin is in C# ... ?

    When i try
    Code:
    var tpPlugin = plugins.Find("m-Teleportation"); tpPlugin.cmdTeleportHome(player, command, args);
    It finds the plugin but not the function.

    Error : : Type `Oxide.Core.Plugins.Plugin' does not contain a definition for `cmdTeleportHome' and no extension method `cmdTeleportHome' of type `Oxide.Core.Plugins.Plugin' could be found. Are you missing an assembly reference?
     
  7. You need to use the callhook method. There are examples above.
     
  8. I feel dumb for havn't read everything now ... Ty Hatemail.