Rust:IO Clans

Allows your players to form and manage clans with Rust:IO

Total Downloads: 43,596 - First Release: Mar 17, 2015 - Last Update: May 1, 2017

4.91489/5, 47 likes
  1. also getting
    Code:
    [Oxide] 11:37 AM [Error] [Clans] Clans: OnServerInitialized failed: Value is not a convertible object: System.Collections.Generic.Dictionary`2[System.String,System.Object] to System.String
    functions until you restart the server then everything is lost
     
    Last edited by a moderator: Jun 5, 2015
  2. Hi, same problem here

    Code:
    > oxide.reload Clans
    [Oxide] 12:41 PM [Info] Unloaded plugin Clans v1.5.1 by playrust.io / dcode
    [Oxide] 12:41 PM [Info] Loaded plugin Clans v1.5.1 by playrust.io / dcode
    [Oxide] 12:41 PM [Error] [Clans] Clans: OnServerInitialized failed: Value is not a convertible object: System.Collections.Generic.Dictionary`2[System.String,System.Object] to System.String
     
  3. Can one of you PM me the contents of oxide/data/rustio_clans.json before the error happened, and after the server has been stopped again?
     
  4. dcode updated Rust:IO Clans with a new update entry:

    1.5.1-1

     
  5. Code:
    [Oxide] 10:52 AM [Info] Clans was compiled successfully in 266ms
    [Oxide] 10:52 AM [Info] Loaded plugin Clans v1.5.0 by playrust.io / dcode
    [Oxide] 10:52 AM [Warning] Clans has replaced the clan chat command which was previously registered by RustIOClans
    [Oxide] 10:52 AM [Warning] Clans has replaced the c chat command which was previously registered by RustIOClans
    [Oxide] 10:52 AM [Error] Clans: OnServerInitialized failed (InvalidCastException: Value is not a convertible object: System.Collections.Generic.Dictionary`2[System.String,System.Object] to System.String)
    [Oxide] 10:52 AM [Debug]   at System.Convert.ToType (System.Object value, System.Type conversionType, IFormatProvider provider, Boolean try_target_to_type) [0x00000] in <filename unknown>:0
      at System.Convert.ChangeType (System.Object value, System.Type conversionType) [0x00000] in <filename unknown>:0
      at Oxide.Core.Configuration.DynamicConfigFile.ConvertValue (System.Object value, System.Type destinationType) [0x00000] in <filename unknown>:0
      at Oxide.Core.Configuration.DynamicConfigFile.ConvertValue[Dictionary`2] (System.Object value) [0x00000] in <filename unknown>:0
      at Oxide.Core.Configuration.DynamicConfigFile.Get[Dictionary`2] (System.String[] path) [0x00000] in <filename unknown>:0
      at Oxide.Plugins.Clans.OnServerInitialized () [0x00000] in <filename unknown>:0
     
    Last edited by a moderator: Jun 5, 2015
  6. Thanks, what does oxide/config/Clans.json contain in your case?
     
  7. here it is
     

    Attached Files:

  8. dcode updated Rust:IO Clans with a new update entry:

    1.5.2

     
  9. worked like a charm, thanks!
     
  10. Is there any way to toggle clan chat as default ? like when u push enter it writes "/c " automatic
     
  11. Hi, not sure if this is me not understanding how to reference another plugin but when I use this:

    Code:
            [ChatCommand("Headquarters")]
            void NewHeadquarters(BasePlayer player, string command, string[] args) {
                Puts(DebugPrefix+"Working");
                string pClanTag = pClansAPI?.Call("GetClanOf",player) as string;
                var playersClan = pClansAPI?.Call("GetClan", pClanTag) as JObject;
                Puts(DebugPrefix+player.userID+":"+pClanTag);
            }
    
    The text output to console is just "mysteamID:blank"

    GetClanOf seems to be returning nothing, and no errors are being thrown and I am definitely in a group

    EDIT: NM I fixed this its actually a thing that seems to have maybe changed? Functions that can be called from other plugins need to be private apparently, Its what I found with my plugin and changing them in Clans fixed it too so maybe they want to look at that?
     
    Last edited by a moderator: Jun 11, 2015
  12. When you restart the server - lost clans
     
  13. [Oxide] 6:11 PM [Info] Loaded plugin Clans v1.5.2 by playrust.io / dcode
    [Oxide] 6:11 PM [Warning] Clans: oxide/config/Clans.json seems to contain an invalid 'messages' structure. Please delete the config file once and reload the plugin.
    [DOUBLEPOST=1433607065][/DOUBLEPOST]Fixed it just delete config.
     
  14. ~Disregard, works great!
     
  15. How do you install this, I know how to install the .cfg files because they go in the plugins file, but how do you install .cs files?
     
  16. Wulf

    Wulf Community Admin

  17. Hey guys, is their way I can modify one of the files to change how the clan tag is shown. What I mean is, right now it would come up in chat as IE: [Wolf] Supramp ...
    To fit our theme, I was wondering if we could make it come up like : Supramp of the house Wolf ...
    if not, I understand, was just an idea.
    Thanks guys.
     
  18. I tried to work with the "Clans" plugin and failed. Im just getting errors everytime.
    What am I doing wrong? :c

    Code:
    void cmdClanState(BasePlayer player, string cmd, string[] args)
    {
       [PluginReference("Clans")] Plugin Clans;
       JArray ClanList = Clans.Call("GetAllClans");
       var clan = GetClan(args[0], player, "CLANS");
                SendChatMessage(player, "CLANS", "Following Clan found:\n" +
                   "Tag: "+ clan.tag+"\n" +
                   "Owner: "+ clan.owner)
    }JObject GetClan(string searchedClan, BasePlayer executer, string prefix)
           {
               var targetClan = null;
                List<string> foundClans =new List<string>();
               string searchedLower = searchedClan.ToLower();
               foreach(var Clan in ClanList)
               {
                   string display = Clan;
                   string displayLower = display.ToLower();               if(!displayLower.Contains(searchedLower))
                   {
                       continue;
                   }
                   if(displayLower.Contains(searchedLower))
                   {
                        foundClans.Add(display);
                   }
               }
               var matchingClans = foundClans.ToArray();           if(matchingClans.Length==0)
               {
                    SendChatMessage(executer, prefix, "No matching clans found!");
               }           if(matchingClans.Length>1)
               {
                    SendChatMessage(executer, prefix, "Multiple clans found:");
                   string multipleClans ="";
                   foreach(string matchingclan in matchingClans)
                   {
                       if(multipleClans =="")
                       {
                            multipleClans ="<color=yellow>"+ matchingclan +"</color>";
                           continue;
                       }                   if(multipleClans !="")
                       {
                            multipleClans = multipleClans +", "+"<color=yellow>"+ matchingclan +"</color>";
                       }               }
                    SendChatMessage(executer, prefix, multipleClans);
               }           if(matchingClans.Length==1)
               {
                    targetClan = Clans.Call("GetClan", matchingClans[0]);
               }
               return targetClan;
           }
     
    Last edited by a moderator: Jun 17, 2015
  19. What were you trying to do exactly? If you were just trying to create clans, its easiest through the chat commands. can always delete the config file and let the plugin reinstall the default, and try again.
     
  20. No, i tried to get infos about a specific clan by the chat command.