WarTime

Allows admins to set a dedicated time for the use of siege weapons

Total Downloads: 1,143 - First Release: May 10, 2015 - Last Update: Jul 26, 2016

4.92308/5, 13 likes
  1. hello how can i put mine so its correct.

    this is how the group format look like in my confg. permission

    }
    admin {
    nameFormat = '%name%'
    chatFormat = '[00FF00][ADMIN][FFFFFF]%name%: [00FF00]%message%'
    guildFormat = '[00FF00][%guild%] %chatFormat%[-]'
    permissions {
    - 'rok.fairplay'
    - '*'
    }
    inherits = ''
    }
     
  2. Not sure what you mean by correct. Is it not working at all? What kind of issues are you having with it? I think you can drop the rok.fairplay line, as the * includes that. You can add [FFFFFF] after the %message%, so all text after is not the same color as the message when players hit enter and the chat box expands. There may also be issues with the []'s around the ADMIN and - as the game is expecting that to be for hex color codes. Try changing the []'s around ADMIN to ().

    Here is a working config. We just use the color red to indicate Admins. I don't set any changes to moderators, so people wanting to log in and cause trouble can't tell if there are any online. (being sneaky)

    admin {
    nameFormat = '[EE0000]%name%[FFFFFF]'
    chatFormat = '%name%: %message%'
    permissions {
    - '*'
    }
    inherits = ''
    }

    Hope this helps.

    I am still hoping there is a fix for this plugin, soon. The workaround is to just disable it in Oxide to allow war. :)
     
    Last edited by a moderator: Dec 16, 2015
  3. I mean the confg.json file

    Do i just do this:

    {
    "Settings": {
    "Admin1": "[00FFFF] Missy",
    "Admin2": "",
    "Admin3": "",
    "Punish": "kick",
    "BanTime": "1"
    }
    }

    This is after i changed the format to () instead of []
     
  4. You just need to put your name in there. Leave out the [00FFFF], these lines just give permissions. It would be nice if the plugin was just based on permissions. :) I tried to convert it and didn't have any luck. I might take a stab at it again. The problem is it isn't working. It just announces whatever Admin1 is set to in Chat.

    You are confused me, because the first post was from the permissions file and this one is from the WarTime.json. :)
     
  5. Ohhh very sorry hahha

    But i have tried to put only the name and it says unknown command. :)
     
  6. ok. The plugin isn't loading, if you are getting an unknown command error. Check the oxide logs in Saves/oxide/logs to see what the error is. My guess is a typo or something missing somewhere that is causing it to not load.
     
  7. If the group is an owner and not admin. Does this still work?
    [DOUBLEPOST=1450278496][/DOUBLEPOST]I got this from the logs

    Console: Wartime.cs(24,8): warning CS0414: The private field `Oxide.Plugins.WarTime.configCreated' is assigned but its value is never used
     
  8. ok. So that is the message for the config file being created. Or maybe an error I can't duplicate. What command are you running that says not found? The two commands would be /wartime and /checkwartime

    Delete the WarTime.json and WarTime.cs files from the folders they are in on the server. Installed the WarTime.cs file back into the plugins directory and it should load and create a new WarTime.cs file.

    Oxide log will look like this when it loads again:

    9:40 AM [Info] WarTime was compiled successfully in 2311ms
    9:40 AM [Info] Loaded plugin WarTime v0.1.0 by Fraccas
    9:40 AM [Warning] [WarTime] WarTime : New configuration file created.
    9:40 AM [Warning] [WarTime] WarTime : The configuration file was updated!
    9:40 AM [Warning] WarTime has replaced the 'wartime' chat command previously registered by WarTime
    9:40 AM [Warning] WarTime has replaced the 'wartime' chat command

    The WarTime.json file will look like this:

    {
    "Settings": {
    "Admin1": "default",
    "Admin2": "default",
    "Admin3": "default",
    "BanTime": "1",
    "Punish": "kick"
    }
    }

    Just replace the default on the Admin1 line with your player name and you then have permissions to do a /wartime but it will only announce your name to chat when you issue the command. At least that's the problem I am having. It's not switching from "peace time" to "war time".

    Hope this helps at least get it installed to that point. :)
     
  9. Ive done it twice and everytime i had to create a json file myself.
    and i used both /wartime and /checkwartime
    [DOUBLEPOST=1450283421][/DOUBLEPOST]Anyway ill keep trying and hopefully it will work :)
     
  10. Excellent plugin... i will suggest a few modifications to this one...

    1) Automatic start (day and time like saturday 00:00)
    2) Automatic finish (day and time like sunday 23:59)
    3) Small ban time (hours instead of days)
     
  11. or even as interval.. 1h wartime on and another 1h watime off, could someone do that?
     
  12. I would like it to just work. :)
     
  13. it works perfectly
     
  14. Nope. No longer switches between peace and war. See my previous posts. Post a fix, if you have it.
     
  15. I can do that... u must set your name into the admins who can set peace or war... here is my config where "fichita" and "sir cyano" can set peace or war

    {
    "Settings": {
    "Admin1": "fichita",
    "Admin2": "Sir Cyano",
    "Admin3": "fichita",
    "BanTime": "1",
    "Punish": "ban"
    }
    }

    I did not touch admin3 line since i think it must be there... then i set the same name i used in line 1
     
  16. Yes. I know this. It doesn't matter what I put in there it just puts whatever is in the Admin1 spot into the chat. default or whatever name is there. I will take another look at later tonight. It used to work, just recently started doing this.
     
  17. Any idea what to do with OnCubeTakeDamage error? can I simply call other void or something?
     
  18. D-Kay updated WarTime with a new update entry:

    1.1.0

     
  19. Just excelent !!!! i will try it later today !!!!
     
  20. Code:
    1:54 PM [Error] Failed to call hook 'OnEntityHealthChange' on plugin 'WarTime v1.1.0' (NullReferenceException: Object reference not set to an instance of an object)
    1:54 PM [Debug]   at Oxide.Plugins.WarTime.OnEntityHealthChange (CodeHatch.Networking.Events.Entities.EntityDamageEvent e) [0x00000] in <filename unknown>:0
      at Oxide.Plugins.WarTime.DirectCallHook (System.String name, System.Object& ret, System.Object[] args) [0x00000] in <filename unknown>:0
      at Oxide.Plugins.CSharpPlugin.InvokeMethod (System.Reflection.MethodInfo method, System.Object[] args) [0x00000] in <filename unknown>:0
      at Oxide.Core.Plugins.CSPlugin.OnCallHook (System.String name, System.Object[] args) [0x00000] in <filename unknown>:0
      at Oxide.Core.Plugins.Plugin.CallHook (System.String hookname, System.Object[] args) [0x00000] in <filename unknown>:0
    2:05 PM [Error] Failed to call hook 'OnEntityHealthChange' on plugin 'WarTime v1.1.0' (NullReferenceException: Object reference not set to an instance of an object)
    2:05 PM [Debug]   at Oxide.Plugins.WarTime.OnEntityHealthChange (CodeHatch.Networking.Events.Entities.EntityDamageEvent e) [0x00000] in <filename unknown>:0
      at Oxide.Plugins.WarTime.DirectCallHook (System.String name, System.Object& ret, System.Object[] args) [0x00000] in <filename unknown>:0
      at Oxide.Plugins.CSharpPlugin.InvokeMethod (System.Reflection.MethodInfo method, System.Object[] args) [0x00000] in <filename unknown>:0
      at Oxide.Core.Plugins.CSPlugin.OnCallHook (System.String name, System.Object[] args) [0x00000] in <filename unknown>:0
      at Oxide.Core.Plugins.Plugin.CallHook (System.String hookname, System.Object[] args) [0x00000] in <filename unknown>:0
    2:09 PM [Error] Failed to call hook 'OnEntityHealthChange' on plugin 'WarTime v1.1.0' (NullReferenceException: Object reference not set to an instance of an object)
    2:09 PM [Debug]   at Oxide.Plugins.WarTime.OnEntityHealthChange (CodeHatch.Networking.Events.Entities.EntityDamageEvent e) [0x00000] in <filename unknown>:0
      at Oxide.Plugins.WarTime.DirectCallHook (System.String name, System.Object& ret, System.Object[] args) [0x00000] in <filename unknown>:0
      at Oxide.Plugins.CSharpPlugin.InvokeMethod (System.Reflection.MethodInfo method, System.Object[] args) [0x00000] in <filename unknown>:0
      at Oxide.Core.Plugins.CSPlugin.OnCallHook (System.String name, System.Object[] args) [0x00000] in <filename unknown>:0
      at Oxide.Core.Plugins.Plugin.CallHook (System.String hookname, System.Object[] args) [0x00000] in <filename unknown>:0
     
    Last edited by a moderator: Mar 16, 2016