How would i add economic support here to sell the weed times the amount they put and add it to their balanceCode:case 2: if(arg[0] == "sell " + WeedAmount) // /weed sell (amount) { } break;
also:
Code:private float SellPrice = 75;
Solved Economics Support In Plugins
Discussion in 'Rust Development' started by Captain Zip, Aug 6, 2017.
-
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"); }
-
-
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 -
[DOUBLEPOST=1502059471][/DOUBLEPOST]