1. Code:
                    case 2:
                        if(arg[0] == "sell " + WeedAmount) // /weed sell (amount)
                        {
                           
                        }
                        break;
    How would i add economic support here to sell the weed times the amount they put and add it to their balance

    also:
    Code:
    private float SellPrice = 75;
     
  2. Why are you checking agr for being the same as your amount.... nverming, here you go:
    use bool Withdraw(ulong playerId, double money)
    Code:
    using Oxide.Core.Plugins;
    //code
    [PluginReference]
    Plugin Economics;
    //code
    //somefunc code
    var econom = Economics?.CallHook("Withdraw", userid, amount);
    if(econom == null || !(bool)econom)
    {
      PrintWarning("Money wasn't spend");
    }
    else
    {
      Puts("Money was spend");
    }
    
    ?. - null check, if the plugin is not loaded the var Economics would be null, so you can't access it's hook. if the money would be spend it would return true. if not - false, so this function is basicly it =)
     
  3. Lots of errors :/ the Oxide.Core.Plugins is there and the pluginreference is there and when i pasted that code i got tons of errors
     
  4. Hm... Are you sure that you put using directive BEFORE namespace?
    This code is 100% working, so.... There must be something you doing wrong.
    [DOUBLEPOST=1502058319][/DOUBLEPOST]Ok, I'm going to sleep, so.... post your code here, so people can help you figure out what is wrong)
    ----
    Wait, I have an idea - have you put your own amount and userid? Of course this could that I've put here would not work as it is =)
     
    Last edited by a moderator: Aug 6, 2017
  5. Yeah it was my error, I wasn't putting it in the case, but the userid and the amount are none existent in the current context, have any ideas why?
    [DOUBLEPOST=1502059471][/DOUBLEPOST]
    OHHHH Makes sense, your variables are different then mine, i was so confused lmao