Anyway to add permission to this so it doesn't randomize items for the whole server pop just players with perms?
Item Skin Randomizer
Randomizes item skins on item creation
Total Downloads: 18,547 - First Release: Sep 2, 2015 - Last Update: Apr 6, 2018
- 5/5, 64 likes
-
-
Add those "if" lines into these functions:
Code:private void OnServerInitialized() { if (!permission.PermissionExists("itemskinrandomizer.use")) permission.RegisterPermission("itemskinrandomizer.use", this);
Code:private void OnItemCraft(ItemCraftTask task, BasePlayer crafter) { if (!permission.UserHasPermission(crafter.UserIDString, "itemskinrandomizer.use")) return;
-
Wulf Community Admin
The official version would be up to @Mughisi though. -
And yes, i dont like crossposting, thats why I did post only the needed code like you did -
-
Why some items can not do the skin
-
Works perfectly ! Thanks guys
-
-
for some reason when i get the frostbite metal face mask, it shows the aztek night hunter mask skin underneath even after relogging any fix?
[DOUBLEPOST=1481389767][/DOUBLEPOST]example:Attached Files:
-
-
Hi there,
i am getting this error messages when someone craft something on server
Code:[Oxide] 13:42 [Debug] at System.Linq.Check.SourceAndSelector (System.Object source, System.Object selector) [0x00000] in <filename unknown>:0 at System.Linq.Enumerable.Select[Skin,Int32] (IEnumerable`1 source, System.Func`2 selector) [0x00000] in <filename unknown>:0 at Oxide.Plugins.ItemSkinRandomizer.GetSkins (.ItemDefinition def) [0x00000] in <filename unknown>:0 at Oxide.Plugins.ItemSkinRandomizer.OnItemCraft (.ItemCraftTask task, .BasePlayer crafter) [0x00000] in <filename unknown>:0 at Oxide.Plugins.ItemSkinRandomizer.DirectCallHook (System.String name, System.Object& ret, System.Object[] args) [0x00000] in <filename unknown>:0 at Oxide.Plugins.CSharpPlugin.InvokeMethod (HookMethod method, System.Object[] args) [0x00000] in <filename unknown>:0 at Oxide.Core.Plugins.CSPlugin.OnCallHook (System.String name, System.Object[] args) [0x00000] in <filename unknown>:0 at Oxide.Core.Plugins.Plugin.CallHook (System.String name, System.Object[] args) [0x00000] in <filename unknown>:0
-
Wulf Community Admin
-
-
yeah, missed that:
Code:[Oxide] 14:06 [Error] Failed to call hook 'OnItemCraft' on plugin 'ItemSkinRandomizer v1.2.2' (ArgumentNullException: Argument cannot be null. Parameter name: source)
-
Would someone be able to upload a working copy with the permissions?
EDIT: Can't post .cs files here but redone sent a copyLast edited by a moderator: Dec 11, 2016 -
-
[Oxide] 09:55 [Error] Error while compiling ItemSkinRandomizer.cs(96,0): error CS1525: Unexpected symbol `}'
-
Wulf Community Admin
-
Can someone please me about PN
sent a working copy with the permissions !?Last edited by a moderator: Dec 12, 2016