Rust-Kits

Moved

Total Downloads: 70,199 - First Release: Oct 21, 2014 - Last Update: Jun 7, 2018

4.96216/5, 185 likes
  1. I said in above post but will put it here again
    reload Kits
    you do this in rcon
    And if you want more kits see this post Kits | Page 107 | Oxide
     
  2. i mean the design of the description, it is colored and there is a part which items are contained in the kit, i see no option where to configure that, especially the option to color something.
     
  3. Is this in a server you play on?
     
  4. I've edited both lines and set 1 as authLevel but I still get "You don't have access to this command" in-game.
    I checked the moderator authLevel and that is 1 so it should work. Might there be another line or console command that I need to do to make it work ?
     
  5. HEY help me ? I create new /kit add vip1 "Only vip" -vip Iff player have vip /kit vip1 He dont use kit :((
     
  6. yes, it is on "ChilloutBude.eu"

    the entire helptext looks like this, here is an example of the custom helptext (i think): Screenshot
     
  7. Please help me
     
  8. please help to configure the helptext of the plugin, the helptext looks actually like this: Screenshot
    i want it to look like this one (colors and status<ready or not>): Screenshot
     
  9. Ask the admin there as he edited the coding as for now I dont have the time to run tests to get it like that
    [DOUBLEPOST=1467143104][/DOUBLEPOST]
    post the script you edited
     
  10. i figured it out, my kits helptext is now colored and nice looking. for everyone who is interested i will post the edited code lines:


    Line 284-336:


    Code:
    bool CanSeeKit(BasePlayer player, string kitname, bool fromNPC, out string reason)
            {
                reason = string.Empty;
                if (string.IsNullOrEmpty(kitname)) return false;
                kitname = kitname.ToLower();
                Kit kit;
                if (!storedData.Kits.TryGetValue(kitname, out kit)) return false;
                if (kit.hide)
                    return false;
                if (kit.authlevel > 0)
                    if (player.net.connection.authLevel < kit.authlevel)
                        return false;
                if (!string.IsNullOrEmpty(kit.permission))
                    if (player.net.connection.authLevel < 2 && !permission.UserHasPermission(player.UserIDString, kit.permission))
                        return false;
                if (kit.npconly && !fromNPC)
                    return false;
                if (kit.max > 0)
                {
                    int left = GetKitData(player.userID, kitname).max;
                    if (left >= kit.max)
                    {
                        reason += "- <color=orange>0</color> left";
                        return false;
                    }
                    reason += "<color=orange>" + $"{(kit.max - left)}" + "</color> left";
                }
                if (kit.cooldown > 0)
                {
                    double cd = GetKitData(player.userID, kitname).cooldown;
                    double ct = CurrentTime();
                    if (cd > ct && cd != 0.0)
                    {
                        reason += "- " + "<color=red>" + $"{Math.Abs(Math.Ceiling(cd - ct))}" + "</color> seconds";
                        return false;
                    }
            else
                {
                    reason += "<color=green>Ready</color>";
                }
                }
             
                return true;        }

    and Line 1084-1101:

    Code:
    [ChatCommand("kit")]
            void cmdChatKit(BasePlayer player, string command, string[] args)
            {
                if (args.Length == 0)
                {
                    if (GUIKits.ContainsKey(0))
                        NewKitPanel(player, 0);
                    else
                    {
                        string reason = string.Empty;
                        foreach (var pair in storedData.Kits)
                        {
                            var cansee = CanSeeKit(player, pair.Key, false, out reason);
                            if (!cansee && string.IsNullOrEmpty(reason)) continue;
                            SendReply(player, "<color=green>/kit " + $"{pair.Value.name} " + "</color>" + "Cooldown: " + $"{reason}" + "<size=12>" + $"\n{pair.Value.description}" + "</size>");
                        }
                    }
                    return;

    it will then look like this in game: Screenshot
     

    Attached Files:

    • Kits.cs
      File size:
      45.7 KB
      Views:
      28
  11. You worked this out yourself?
    Have you ever done any coding before?
     
  12. yes i have done it myself and yes i have coded before, but i am not an expert in this, this stuff took some time ^^
     
  13. Very nice was going to work on this tomorrow will save me the work now
     
  14. but it would be much better if we could change those things in a config file, not everyone understands code ;)
     
  15. You could always add the config options and send the changes to the coder
     
  16. Hello, i made a kit that give a smoke but when i do the kit (/kit supply) i receive nothing :( plss halp
     
  17. upload your kits.json from your data folder using the upload a file option
     
  18. What is the upload option ?
     
  19. oh sorry xD so here it is:
     

    Attached Files: