Well i trying to fix one line for 25minutes..
My code look like
error:Code:if(args[1] == "K") { if(permission.UserHasPermission(target.userID.ToString(), "cansomething")) { SendReply(player, prefix + ": " + "This player has already this permission!"); return; } permission.GrantUserPermission(target.userID.ToString(), "cansomething"); }
I'm tired of trying to fix this.. i clearly do the same as i do in permission.UserHasPermission(string steamId, string permission);Code:No overload for method `GrantUserPermission' takes `2' arguments
Any1 knows why this happens ?
Thanks for any help,
PaiN
GrantUserPermission not working
Discussion in 'Rust Development' started by PaiN, Aug 14, 2015.
-
Wulf Community Admin
-
Okay i've set "this" as a third argument seems to work.. Thanks Wulf!
[DOUBLEPOST=1439580772][/DOUBLEPOST]I'm always gonna tell that something is right and is wrong LOL..
It doesnt even add the permission.. any other thoughts ?
[DOUBLEPOST=1439596639,1439578622][/DOUBLEPOST]Any1 ??
Yeah ik that i shouldn't "triple post" xD But its really important .. atleast for me. -
Wulf Community Admin
It works fine, that's how the commands use it as well minus the owner (null instead.)
permission.GrantUserPermission(userId, perm, this);
https://github.com/OxideMod/Oxide/blob/master/Oxide.Game.Rust/RustCore.cs#L504 -
Have you registered the permission with your plugin you are trying to grant?
-
Yeah its registered by another plugin.
I will try once more then... -
https://github.com/OxideMod/Oxide/blob/master/Oxide.Core/Libraries/Permission.cs#L411 -
-
-
-
https://github.com/OxideMod/Oxide/blob/master/Oxide.Core/Libraries/Permission.cs#L164 -