Absolut submitted a new resource:
CustomAutoKits - Automatic kits by permission
Read more about this resource...
CustomAutoKits [Merged with Kits]
Discussion in 'Plugin Support' started by Absolut, Feb 22, 2017.
-
Another great plugin
-
I was wondering if there is an option to call "player.inventory.Strip()" to clean up player's inventory before giving players the auto kits when they respawn. (I use default AutoKit for basic player, try to avoid vip players who haveCustomAutoKits permissions redeem both Autokit and CustomAutokits at the same time when they respawn)
-
-
the ones i use are autodefault, autovip, autoadmin, autoyoutube. works good for me just they spawn with a rock and a torch aswell, but better than having 2 kits spawn eh? Also you need to grant eg group default autodefault.allow or whatever you named default kit etc, this means any vips need to be removed from default group and be only in vip group or the double kit's will happen again
Below is my config for customautokits.
Code:{ "AutoKits": { "autoadmin.allow": "autoadmin", "autovip.allow": "autovip", "autoyoutube.allow": "autoyoutube", "defaultauto.allow": "defaultauto" } }
-
i see.
-
May I suggest you update this plugin so that it doesn't have items you don't want in it. Eg, rock and torch. Other than that it'd be good!
-
I managed to make it so the Rock and Torch don't come up. I also used Deleted 2's post.
By adding player.inventory.Strip(); before calling the Kits?.Call
No Errors my end.
Code:private void OnPlayerRespawned(BasePlayer player) { if (EventManager) { object isPlaying = EventManager?.Call("isPlaying", new object[] { player }); if (isPlaying is bool) if ((bool)isPlaying) return; } foreach (var entry in configData.AutoKits) if (permission.UserHasPermission(player.UserIDString, this.Name + "." + entry.Key)) { player.inventory.Strip(); Kits?.Call("GiveKit", player, entry.Value); break; } }
-
Ill strip on that version
For kits:
Code:void OnPlayerRespawned(BasePlayer player) { bool StrippedInv = false; if (!storedData.Kits.ContainsKey("autokit")) return; var thereturn = Interface.Oxide.CallHook("canRedeemKit", player); if (thereturn == null) { player.inventory.Strip(); GiveKit(player, "autokit"); StrippedInv = true; } if (EventManager) { object isPlaying = EventManager?.Call("isPlaying", new object[] { player }); if (isPlaying is bool) if ((bool)isPlaying) return; } foreach (var entry in AutoKits) if (permission.UserHasPermission(player.UserIDString, this.Title + "." + entry.Key)) { if (!StrippedInv) { StrippedInv = true; player.inventory.Strip(); } GiveKit(player, entry.Value); } }
-
Wulf Community Admin
Marked as replaced per author's request as plugin has been merged with the original Kits plugin.