ServerRewards

Moved

Total Downloads: 14,033 - First Release: Mar 2, 2016 - Last Update: Jun 9, 2018

5/5, 61 likes
  1. So I added:

    "RewardCommands": {
    "Make Server Day": {
    "Command": "evn.time 10",
    "Description": "This command will set the server time to 10:00 making it day",
    "Cost": 25
    },
    "Make Server Night": {
    "Command": "evn.time 22",
    "Description": "This command will set the server time to 22:00 making it night",
    "Cost": 25
    }
    },

    and now I cant get the .json to load again... Unless the config changed and the overview hasnt changed....
     
  2. I dont use that other plugin to many bugs with it
     
  3. So I added:

    "RewardCommands": {
    "Make Server Day": {
    "Command": "evn.time 10",
    "Description": "This command will set the server time to 10:00 making it day",
    "Cost": 25
    },
    "Make Server Night": {
    "Command": "evn.time 22",
    "Description": "This command will set the server time to 22:00 making it night",
    "Cost": 25
    }
    },

    and now I cant get the .json to load again... Unless the config changed and the overview hasnt changed....
     
  4. Not sure why you said this twice and still wont upload the file
     
  5. I posted it again becuase I thought maybe you overlooked it... also how am I supposed to know what I need to look for when solving if the config is just always fixed and handed back? I want to learn so I can problem solve my eddits and possibly eventually help others.
     

    Attached Files:

  6. I told you what was wrong already in the above post

    Ok here is the fix and here is what was changed

    Your file
    Code:
    "RewardCommands": {
      "Make Server Day": {
          "Command": "evn.time 10",
          "Description": "This command will set the server time to 10:00 making it day",
          "Cost": 25
        },
        "Make Server Night": {
          "Command": "evn.time 22",
          "Description": "This command will set the server time to 22:00 making it night",
          "Cost": 25
        }
       },
    My fix and the way it should look
    Code:
    "RewardCommands": {
        "Make Server Day": {
          "Command": [
          "evn.time 10"
          ],
          "Description": "This command will set the server time to 10:00 making it day",
          "Cost": 25
        },
        "Make Server Night": {
          "Command": [
          "evn.time 22"
          ],
          "Description": "This command will set the server time to 22:00 making it night",
          "Cost": 25
        }
      },
     

    Attached Files:

    Last edited by a moderator: Dec 11, 2016
  7. So if I understand correctly you just put [] around the actual command? Is that because its a console command?
     
  8. Yes you missed [], and moving part to a new line as you can see above
    If you say wanted it to be something in chat
    Code:
    "RewardCommands": {
        "chat": {
          "Command": [
            "say RockOn!, $player.name!",
            "say [I]YeahYeah[/I], $player.name!"
          ],
          "Description": "",
          "Cost": 1
        },
        "chat2": {
          "Command": [
            "say RockOn!, $player.name!"
          ],
          "Description": "",
          "Cost": 1
        }
      }
    }
    Then you would do it like this I left the description blank but you can put something in there but its not needed
     
  9. so im going to guess that this addon will only reconise chat commands and not console commands?
    The addon isnt recognizing "env.time 22" as a command

    so then I tried using the Alias system to change the console command to a chat command and it still dosent seem to work...

    So the chat command to make it day should be /day and night should be /night and neither seem to work. (replaced env.time XX with the appropiate chat command) I have tried the command both with and without the / infront of the command.
     

    Attached Files:

  10. I dont even use this part of the plugin and dont have the time to fix every problem sorry try asking the coder of the plugin and also looking at the overview. I can tell you what you have there will only work if the plugin it comes from has that command and allows default players use it
     
  11. Ummm thats why Im posting in the addon support thread and not mailing you directly.
     
  12. Try checking the overview it does have some tips
     
  13. k1lly0u updated ServerRewards with a new update entry:

    0.3.8


    [DOUBLEPOST=1481533321][/DOUBLEPOST]@Razor14150 I just added the command and it worked fine. It runs commands as a server command so doesn't matter whether your a player or admin. Here is exactly what I wrote using chat commands "/rewards add command ChangeTime "env.time 22" 1"
     
  14. [Oxide] 10:31 [Error] Failed to call hook 'cmdChangeElement' on plugin 'ServerRewards v0.3.8' (KeyNotFoundException: The given key was not present in the dictionary.)

    (04:31:15) | [Oxide] 10:31 [Debug] at System.Collections.Generic.Dictionary`2[Oxide.Plugins.ServerRewards+ElementType,Oxide.Game.Rust.Cui.CuiElementContainer[]].get_Item (ElementType key) [0x00000] in <filename unknown>:0

    at Oxide.Plugins.ServerRewards.GetElement (ElementType type, Int32 page, System.String npcid) [0x00000] in <filename unknown>:0

    at Oxide.Plugins.ServerRewards.SwitchElement (.BasePlayer player, ElementType type, Int32 page, System.String npcid) [0x00000] in <filename unknown>:0

    at Oxide.Plugins.ServerRewards.cmdChangeElement (.Arg arg) [0x00000] in <filename unknown>:0

    at Oxide.Plugins.ServerRewards.DirectCallHook (System.String name, System.Object& ret, System.Object[] args) [0x00000] in <filename unknown>:0

    at Oxide.Plugins.CSharpPlugin.InvokeMethod (HookMethod 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 name, System.Object[] args) [0x00000] in <filename unknown>:0
     
  15. I have the Same error
     
  16. Just loadimages will fix the problem
     
    Last edited by a moderator: Dec 13, 2016
  17. Me too.
     
  18. How do you load the images now that you've changed it?
     
  19. same error!