Thanks for your help! However, I still don't have access to the command for some reason. I'm trying to do /kit add.
Rust-Kits
Moved
Total Downloads: 70,199 - First Release: Oct 21, 2014 - Last Update: Jun 7, 2018
- 4.96216/5, 185 likes
-
I really don't know what I'm doing wrong XD! I've done everything you have said but yet I still don't have access to the commands.
[DOUBLEPOST=1486677130][/DOUBLEPOST]
[DOUBLEPOST=1486677488][/DOUBLEPOST]Do I need to issue the commands through something like Rusty or directly through Rust?
[DOUBLEPOST=1486677825][/DOUBLEPOST]
1. Installed the plugin
2. Moved plugin to the plugin folder for the server.
3. Made myself the owner of the server.
4. Re-logged into the server.Attached Files:
-
-
-
-
-
-
-
/kit add "vip"
then the next line
/kit items description "VIP reward" permission vip
then make a vip group and add the permission kits.vip to the group but say you want to make a group without a pemission
/kit add "hunter"
/kit items description "Help to hunt them beasts, usable twice at 1hour interval" cooldown 3600
you can add the cooldown if you want if not just remove cooldown 3600 from it and change the description if you want you also dont need to use the kit names I use make up your own. Make sure you remove all items from yourself and add new items for each kit -
Hello, if i try to create a new kit /kit add .... it keeps telling me i have no access to this command. do i have to set a permission to admin?
-
/kit add <name> doesn't save my inventory and gives empty kit. Succesfuly created kit but it's empty..
-
ie:
1. /kit add "Medic"
2. /kit items description "Medic kit" cooldown 1800 (there's a lot of options if you read OP)
3. PROFIT -
-
You must have the items on your char before making each kit
After you make a kit with a permission it will have the kits. in front of it so for vip it will be Kits.vip for donator it will be Kits.donator just do what I posted below and it will auto add the Kits. in front of the permission.
The permission that you will now find in your kits.json file found in your oxide/data folder is what you will need to add to the new group you have set up for the special kit
Just add the items to yourself in game then copy and paste each line change the name and description if you want the only kit you must leave as it is, is the autokit
/kit add "autokit"
/kit items description "This is the autokit" authlevel 2
/kit hide true
/kit add "daily"
/kit items description "Daily resources for being so devoted" cooldown 86400
/kit add "starter"
/kit items description "Help to get started, usable twice at 1hour interval" cooldown 3600
/kit add "sniper"
/kit items description "Help for them raids, usable twice at 1hour interval" cooldown 3600
/kit add "hunter"
/kit items description "Help to hunt them beasts, usable twice at 1hour interval" cooldown 3600
/kit add "blueprints"
/kit items description "Couple blueprints to help you start"
/kit add "donatorreward"
/kit items description "Donator reward" permission donator
/kit add "vip"
/kit items description "VIP reward" permission vip
/kit add "moderator"
/kit items description "Moderator Kit" authlevel 1
/kit add "admin"
/kit items description "Admin Kit" authlevel 2
If you don't want the cooldown then remove first before adding I find it best to copy all above to notepad then change what you need -
-
Please update plugin to avoid free space in GUI Kit menu when user have no permission.
new UPD, Added variable for count per page, and fixed listing page by page for gui menu.
All my changes are marked. I think it will be usefull.
You can just change functionRefreshKitPanel (~line 912):
void RefreshKitPanel(BasePlayer player, ulong guiId, int minKit = 0)
{
PLayerGUI playerGUI;
if (!PlayerGUI.TryGetValue(player.userID, out playerGUI))
PlayerGUI[player.userID] = playerGUI = new PLayerGUI();
playerGUI.guiid = guiId;
playerGUI.page = minKit;
DestroyGUI(player, "KitListOverlay");
Game.Rust.Cui.CuiHelper.AddUi(player, kitlistoverlay);
var kitpanel = GUIKits[guiId];
var perPage = 14; //OTAMAH: [per Page Count]
var max = minKit + perPage; //OTAMAH: 8 => perPage
if (max > kitpanel.kits.Count) max = kitpanel.kits.Count;
var j = minKit; //OTAMAH added
var VisibleCount = 0; //OTAMAH added
for (var i = minKit; i < kitpanel.kits.Count; i++) //OTAMAH: change i< max TO i< kitpanel.kits.Count
{
var kitname = kitpanel.kits.ToLower();
string reason;
var cansee = CanSeeKit(player, kitname, true, out reason);
if (!cansee && string.IsNullOrEmpty(reason)) continue;
if ( j < max ) {
Kit kit = storedData.Kits[kitname];
var kitData = GetKitData(player.userID, kitname);
var ckit = buttonjson.Replace("{color}", "0.5 0.5 0.5 0.2");
ckit = ckit.Replace("{guimsg}", $"'{kitname}'");
ckit = ckit.Replace("{ymin}", (1.2 - ((j - minKit) + 1) * 0.0775).ToString()); //OTAMAH Changed i=>j
ckit = ckit.Replace("{ymax}", (1.2 - (j - minKit) * 0.0775).ToString()); //OTAMAH Changed i=>j
ckit = ckit.Replace("{kitfullname}", kit.name);
ckit = ckit.Replace("{kitdescription}", kit.description ?? string.Empty);
ckit = ckit.Replace("{imageurl}", kit.image ?? "http://i.imgur.com/xxQnE1R.png");
ckit = ckit.Replace("{left}", kit.max <= 0 ? string.Empty : (kit.max - kitData.max).ToString());
ckit = ckit.Replace("{cooldown}", kit.cooldown <= 0 ? string.Empty : CurrentTime() > kitData.cooldown ? "0" : Math.Abs(Math.Ceiling(CurrentTime() - kitData.cooldown)).ToString());
Game.Rust.Cui.CuiHelper.AddUi(player, ckit);
j++; //OTAMAH
}
VisibleCount++;
}
var pageminus = minKit - perPage < 0 ? 0 : minKit - perPage; //OTAMAH: 8 => perPage
//var pageplus = minKit + perPage > kitpanel.kits.Count ? minKit : minKit + perPage; //OTAMAH: 8 => perPage
var pageplus = minKit + perPage > VisibleCount ? minKit : minKit + perPage; //OTAMAH: 8 => perPage , VisibleCount
var kpage = kitchangepage.Replace("{pageminus}", pageminus.ToString()).Replace("{pageplus}", pageplus.ToString());
Game.Rust.Cui.CuiHelper.AddUi(player, kpage);
}Last edited by a moderator: Feb 14, 2017 -
My question is kind of simple. When I create a kit with a permission or increased authlevel, but without using /kit hide true will players be able to see those kits with /kit even if they don't have the permission or authlevel? If not, will they become able to see the kits once they are given the permission or authlevel? Might I have to reload the plugin or have the player relog to properly see them? I am the admin/owner of my server and see all the kits, I don't have an idea of what my players can see.
-
-
How to automatic prevent players from getting kit if there is no free space in the his inventory?