Zone Command

Executes the commands when a player is entering a zone

Total Downloads: 1,112 - First Release: Jul 22, 2015 - Last Update: Mar 17, 2017

5/5, 6 likes
  1. about the question above:
    EVERY time a player enters a zone commands are executed. (the players could go in / go out / go in / go out etc.)
    lets say it only would give 1 AK to player. He will get one every time.

    on the other hand it will be executed only ONCE. there must be somthing between ;)

    The Zone should only execute the command lines with a cooldown. Lets say 1 hour.
    if a player enters the zone. he get 1 AK. if he tries to get one again the commands won´t be executed till 1 hour is over. then he can gain one again.
    similar to the GUISHOP Plugin. it has a cooldown function too.

    ps.
    if someone enters a zone, all command-lines are executed.
    (maybe make command1 after x sec / command2 after y / ...) that the zone dont execute all lines at the same time. or something like this would bring alot of more variations to the plugin.

    would be really nice :)

    everything else is working fine. good job
     
    Last edited by a moderator: Jun 2, 2016
  2. This is a great mod, thank you for this! Question: Would it be possible to have this play a specific music file when a player enters a zone?

    2nd Question/Idea (If anyone feels like reading my random thoughts, thanks) On my server, I'm attempting to setup an actual town where real players role-play jobs, e.g. Blacksmith (sell metals), Grocery store (sell food), Gunsmith (sell guns), Mason (sell stone), Carpenter (sell wooden items) etc. I want the economy to form completely on its own, let them do the job. I don't want to get involved as an Admin, unless necessary. However, I want to set up some boundaries to ensure they are at least attempting to do their job and they actually want to role-play, not just take advantage of the situation ^^. That is, I don't want them to simply begin hording all the items for themselves, or doing the job for several days, gathering what they've accumulated and leaving. I'm therefore working on using the zonemanager, plus this plugin and the jail plugin to inhibit that. I'm attempting to figure out a way of basically, jailing the players who volunteer to take the job in the town and inhibit them from teleporting or trading items outside of the town limits. In town they have access to their buildings and their job inventory and can trade items with others as they please. I'm trying to write a script that after a certain hour or when they choose, they can just play the game as they want. This will allow them to no longer be jailed to the zone, and just go about playing the game as a regular player. However, I want to inhibit them from accessing their store, and their store items; also moving all items they have on themselves to their store loot boxes. This would stop them from attempting to steal from their own store / the town. My first thought was to assign each job position a separate player ID, and giving that player ID specific rules based on their job role, and then when the user wishes to switch back to a regular player, switch their player ID to their original player ID (separate from the job ID). Anyone think this is possible? Any tips or comments are appreciated. Thanks for reading, sorry for the long ass post.
     
    Last edited by a moderator: Jul 5, 2016
  3. I think you can play only built-in sounds.
    Please post your ideas in Rust Requests | Oxide And yes it's possible.
     
  4. Apologies and thanks. It's a pity o have many sound files id love to input into the game.
     
  5. Code:
    [Oxide] 03:22 [Error] ZoneCommand v0.0.35: Unable to load data file
    [Oxide] 03:22 [Info] Unloaded plugin ZoneCommand v0.0.35 by deer_SWAG
    [Oxide] 03:22 [Error] [ZoneCommand] You have to install ZoneManager for use this plugin
    Why do i get this even on reinstall of both plugins?
     
  6. Try to delete ZoneCommand data file from data folder.
     
  7. deer_SWAG updated Zone Command with a new update entry:

    0.1.0

     
  8. Using ZoneManager 2.4.4 (latest) and I still get when loading this:
    Code:
    (18:07:08) | [Oxide] 18:07 [Info] Loaded plugin ZoneCommand v0.1.0 by deer_SWAG
    (18:07:08) | [Oxide] 18:07 [Error] ZoneCommand v0.1.0: You need to install ZoneManager or RectZones to use this plugin
    deleting data in data file did not help, still same error and if I do /zcmd vars:
    Code:
    (18:00:05) | [Oxide] 18:00 [Error] Failed to call hook 'cmdChat' on plugin 'ZoneCommand v0.1.0' (ArgumentOutOfRangeException: Argument is out of range.
    Parameter name: index)
    (18:00:05) | [Oxide] 18:00 [Debug]   at System.Collections.Generic.List`1[Oxide.Plugins.ZoneCommand+QueryLanguage+Lexem].get_Item (Int32 index) [0x00000] in <filename unknown>:0
      at Oxide.Plugins.ZoneCommand+QueryLanguage+Parser.ParseCommand () [0x00000] in <filename unknown>:0
      at Oxide.Plugins.ZoneCommand.cmdChat (.BasePlayer player, System.String command, System.String[] args) [0x00000] in <filename unknown>:0
      at Oxide.Plugins.ZoneCommand.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
     
  9. Hi,
    I was wondering if it is possible to add a timer to the commands, I tried Timed Execute but it doesn't work like zone command using $player.id/name.
    Below is what i have/need.
    {
    "Id": "27682741",
    "Method": 1,
    "Mode": 0,
    "Amount": -1,
    "UserGroup": "",
    "Commands": [
    "createtimer 1200",
    "global.say point one is being taken by $player.name",
    "sr add $player.name <amount>" <= want this to happen after the createtimer 1200 finishes
    ],
    "Players": []
    },
     
  10. I get the same :(
     
  11. it says this but still works
     
  12. well, mine wont work so idk.
     
  13. I'm trying to add a command with the plugin Healer. So a player going into a Zone (made with ZoneManager) will heal. I just cant seem to get it to work. Can I get a hand off someone please?

    EDIT:

    I worked it out, I used this line - /zcmd add 27621927 on enter execute always per player {/heal 100 $player.id}
     
    Last edited by a moderator: Feb 6, 2017
  14. You should only need to use /zcmd add 27621927 on enter execute {/heal 100 $player.id} for it to always work for each player
     
  15. hi ,

    I have a problem

    In-Game i wrote :/zcmd add 90126498 "say test" doesn't work and this message :

    Failed to call hook 'cmdChat' on plugin 'ZoneCommand v0.1.0' (ArgumentOutOfRangeException: Argument is out of range.
    Parameter name: index)

    :s

    I try to re-instal all my pugins and check update.

    I need ur help mates :D thanks !
     
  16. I found that this plugin isn't working anymore, tried reloading the plugin and get this msg "(21:57:59) | Error while compiling: ZoneCommand.cs(528,18): error CS1955: The member `BasePlayer.IsAdmin' cannot be used as method or delegate"

    In the plugin file changer "baseplayer.isadmin()" to "baseplayer.isadmin"
     
    Last edited by a moderator: Mar 14, 2017
  17. Mughisi updated Zone Command with a new update entry:

    0.1.1

     
  18. I would like to call a Heli to the player that enters a zone. Is the code:

    /zcmd add 123456 "callheli $player.name" "say Warning: Security Are On their Way, Leave this area now"

    And how do I make it so it ignores either a player.name, or ignores the Admin?
     
  19. Righto, worked this out, the working commands are:

    /zcmd 123456 on entry {callheli $player.name}
    /zcmd 123456 on exit {killheli}

    Question: Is it possible to make it so that the Admin (or a specific player) can be excluded from these commands.
     
  20. How to automatically give a kit to a player when he enter the zone, and then to remove him the kit if he leave¿?
    Thanks for your attention.