Solved Zone radius (circle draw)

Discussion in 'Plugin Requests' started by Freaky, May 5, 2015.

  1. Hi all !
    As an admin i make zones on my server (with http://oxidemod.org/plugins/zones-manager.739/) ... it is possible to see the zone radius (like /zone draw true)... enable a circle draw of zone radius ?!

    P.S.: Now to see the zone radius i use the enter/leave messages!
     
  2. I see you can use /zone_list to show all the zones with the radiuses. If that doesn't work for you you either have ask nicely @Reneb to include an additional command or do it yourself.

    if you need it badly right now open Zone.cs file, scroll to around ~100 line where you have "public class ZoneLocation", and underneath it change "float radius;" to "public float radius;". then scroll down to the end of your file when the commands are, and paste this in between them somewhere:
    Code:
    [ChatCommand("zone_rad")]
            void cmdChatZoneShowRad(BasePlayer player, string command, string[] args)
            {
                if (!hasPermission(player, "zone")) { SendMessage(player, "You don't have access to this command"); return; }
                if (args.Length == 0) { SendMessage(player, "/zone_rad XXXXXID"); return; }
                if (zonedefinitions[args[0]] == null) { SendMessage(player, "This zone doesn't exist"); return; }
                LastZone[player] = args[0];
                SendMessage(player, "zone ID: " + args[0] +" Radius: "+zonedefinitions[args[0]].Location.radius.ToString());
            }
    /zone_rad id should give you the radius now.
     
  3. i want to draw a line (circle) to see the limit zone... i don't want to see the zone radius... ex. radius 20 ...

    P.S.: i don't know if you give me the drawing code above!
     
  4. nope it's not a drawing code, it's just to display radius. i don't think we can draw directly onto game world objects although i'm not 100% sure. what you could do though, is take something like other very good Reneb's plugin "Build". Then you would need a piece of code that calculates points on the sphere that zone is, and spawn pillars or something more visible in those points. this is not ideal but gives you an overview. Pretty sure there is no plugin that does this though, you would have to find a dev that would write it for you (pretty sure no more than 100 lines of code ).
     
  5. k thanks ... i asked if is possible ... maybe Reneb could add on his plugin ZoneManager the drawing thing ... like /zone_draw id
     
  6. can i ask why you need this? i mean do you need to see them or do you just want to get a feeling of how big they are? if second, you can also do it like this:
    get zone location and radius (20)
    teleport to center of the zone
    get your location (for example x,y,z)
    now you can teleport to (x+20,y,z) and you will be teleported to the edge of your zone
    you can do(x-20,y,z) and you will be teleported to the edge of the zone but on the other side
    you can also +/- 20 from y and z (but only from one of them at the same time!) to teleport to 4 more points on the edges of your zone.
    this is not ideal but should give you fair overview of how big the zone is.
     
  7. i made my base and she will be protected by snipers who will kill on sight everyone who enters the zone. I want to put signs of warnings inside the zone but on a circular line (zone radius). i will spent a lot of time doing the teleport thing, but with that line drawing i will see exactly where to put my signs or to see the sniper range (radius)! :)


    I'm not a bad Admin, i help the players! :))
     
  8. you can yes i'll add it as a feature at some point
     
  9. oo thanks Reneb! Regards!
     
  10. It should be sphere, not circle;)
     
  11. yes,ideal, but i dont need really a sphere, just a circle like 1m above the ground to see the edges of the zone... (if Reneb is willing to make a sphere i don't mind :) )
     
  12. hooooly molly, so apparently i was very wrong about this, i just found playrust.io draw plugin oO. this just opened my eyes to whole new possibilities.

    i've done this as a test. you can use /zone_show zoneID and it will draw a 'red' sphere around the zone for 30 seconds. this doesn't look very nice and can be hard to see from some angles but no point of me tweaking it if Reneb is going to include it soon anyway.
     
  13. Using external plugin for drawing 1 shpere is a bit... too much :)
     
  14. nah, i just didn't know it was possible at all. the drawing "plugin" is like 10 lines of actual code, i just copied the one needed into the zonemanager so @Freaky can have fun with his signs before the ZM gets updated :)
    [DOUBLEPOST=1430827255][/DOUBLEPOST]
    Code:
           [ChatCommand("zone_show")]
            void cmdChatZoneShowRad(BasePlayer player, string command, string[] args)
            {
                if (!hasPermission(player, "zone")) { SendMessage(player, "You don't have access to this command"); return; }
                if (args.Length == 0) { SendMessage(player, "/zone_rad XXXXXID"); return; }
                if (zonedefinitions[args[0]] == null) { SendMessage(player, "This zone doesn't exist"); return; }
                LastZone[player] = args[0];
                player.SendConsoleCommand("ddraw.sphere", 30.0f, Color.red, zonedefinitions[args[0]].Location.GetPosition(), zonedefinitions[args[0]].Location.GetRadius());
            }
    this is all that i added
     
  15. that's why i think a capture the flag could be fun to make at some point ^^
     
  16. damn man where do you even find the time :D if you plan on making CTF at least skip on king of the hill please :)
     
  17. protect the VIP, CTF, kind of the hill, etc i would love !!!
    that's why i want to make a very strong "basic" event manager that will allow mods to only be for modding new games and not having to redo most of the previous codes ^^. it's taking a long time on making 1 thing to have more fun in making other things after ^^
    but won't be anytime soon sadely ^^
     
  18. oooh protect the vip i din't even think about, nice. for king of the hill we wanted an actual castle as a battlefield, on top of the mountain of course :)leave only one path leading to it and make an obstacle course on it so the potential challengers have to sweat for it first. set the reward high enough, turn on the spectator mode and enjoy the rat race :)
     
  19. You should have a look at ddraw in Assembly-CSharp ;)
     
  20. yeah i see i won't be able to keep a visit there on the TODO list forever. is it ok if i disassemble the server Assembly-CSharp while the steam with rust client is running on the same machine? yet again i'm worried about the EAC bitching. i remember good all times when DRMs locked down if they saw anything remotely similar to a debugger, and editing Assembly-CSharp is how people make hacks after all...