Yes I have seen the video and have been using kits for a long time now. I used to use just the default autokit but have tried setting up custom autokits and now it doesn't seem to work properly.
Interestingly enough, after trying to do some troubleshooting myself I've figured something out regarding this.
I've added some Puts commands into the code of Kits.cs to verify that custom autokits are properly being read as well as to see why I am defaulting to the last kit in the list even though I have proper permissions.
Upon trying to give me the VIPKit, it fails and the variable 'success' as a string outputs: You do not have enough inventory space for this Kit! Here are the Puts I have used.
This is the console output corresponding with my Puts: Gyazo - 7bfc1e01876ac09a051e4997778260d5.pngCode:if (storedData.Kits.ContainsKey("autokit")) { player.inventory.Strip(); GiveKit(player, "autokit"); Puts("gave regular autokit"); return; } foreach (var entry in AutoKits.OrderBy(k=>k.Key)) { Puts(entry.Value); var success = CanRedeemKit(player, entry.Value, true) as string; Puts(success); if (success != null) continue; player.inventory.Strip(); success = GiveKit(player, entry.Value) as string; Puts("gave player " + entry.Value); if (success != null) continue; proccessKitGiven(player, entry.Value); return; }
Rust-Kits
Moved
Total Downloads: 70,199 - First Release: Oct 21, 2014 - Last Update: Jun 7, 2018
- 4.96216/5, 185 likes
-
-
-
-
-
-
It seems as though the issue occurs any time I set up a kit with more than 12 items in the Main container. Even with a fresh install of Kits on a separate locally hosted server, any time I try to put more than 12 items in the Main container Kits thinks there isn't enough space in the players inventory and doesn't grant that kit.
You can see the math below and the output of my testing here: Gyazo - fa67477382d3309fd18d9798b9fe7e1d.png
Code:int beltcount = kit.items.Where(k => k.container == "belt").Count(); int wearcount = kit.items.Where(k => k.container == "wear").Count(); int maincount = kit.items.Where(k => k.container == "main").Count(); Puts("main capacity: " + player.inventory.containerMain.capacity); Puts("itemlist count: " + player.inventory.containerMain.itemList.Count); Puts("maincount: " + maincount); int totalcount = beltcount + wearcount + maincount; if ((player.inventory.containerBelt.capacity - player.inventory.containerBelt.itemList.Count) < beltcount || (player.inventory.containerWear.capacity - player.inventory.containerWear.itemList.Count) < wearcount || (player.inventory.containerMain.capacity - player.inventory.containerMain.itemList.Count) < maincount) if(totalcount > (player.inventory.containerMain.capacity - player.inventory.containerMain.itemList.Count)) return GetMsg("NoInventorySpace", player.userID);
I had a suspicion that the plugin StackSizeController could be an issue, but I've just confirmed that it isn't. I thought that Kits would see a stack of over 128 bullets and split them into multiple 128 sets and this could be triggering the NoInventorySpace message, but after some testing this isn't the issue.Last edited by a moderator: Apr 5, 2017 -
Did you test this with the default plugin?
-
-
Have problem with Custom Autokits:
in config
"Custom AutoKits": {
"0": "elitespawn",
"1": "startspawn"
},
and kits with permissions, permission kits.elitespawn to group elite and kits.spawn for group default, but i not elite and no privs elitespawn respawn with elitespawn kit.
sorry my bad english -
if i understand you need grant user a group to spawn kit on him (with priv.)
grant group <groupname> <permission>
usergroup add <username> <groupname>
Command to add the autokit is:
/kit add "autokit" "blabla bla bla" -admin => dont forgot to add the -admin to prevent players from requesting it manuallyLast edited by a moderator: Apr 5, 2017 -
Custom autokits for spawn with different kits on elite accounts and default accounts .
already set and dont work:
-
dunno what u set than but it works
-
Hey is there anyway that you can make it so u can have a certain kit only for the steam members?
-
-
I've been using kits for a few months now. First off, amazing plugin, very useful! If I had one idea (or question), it would be: How do I make it so kits have a delay before being able to be redeemed after a wipe? For instance, I have VIP kits setup. I don't want the VIPs to instantly have access to the kits on wipeday. Is there any way that you guys can think of that I can delay a certain kit from being redeemed immediately on wipe day? I'd like for people to have to wait 24 hours or so. I don't mind doing it manually or something, just need to know if there's a way to do this at all right now. Thank you and keep up the wonderful work!
-
No one has any ideas? Why are two of the custom autokits with different permissions for other groups always given to everyone first on the list cistom autokits.
-
Tiger i bit dont understand u need explain it bit more
[DOUBLEPOST=1491487180][/DOUBLEPOST] -
I'm install plugin.
Create group elite in oxide and have default group.
Remove autokit for work custom autokits.
Create 2 custom autokits
elitespawn with perms kits.elitespawn
startspawn with perms kits.spawn
grant perm kits.elitespawn to group elite
grant perm kits.spawn to group default
in kits config write:
"Custom AutoKits": {
"0": "elitespawn",
"1": "startspawn"
},
Problem, players with group default spawns with kit elitespawn and group elite spawn with elitespawn.
If i change the order to:
"Custom AutoKits": {
"0": "startspawn",
"1": "elitespawn"
},
then elite and default group spawn with startspawn
-
Last edited by a moderator: Apr 6, 2017