Restriction builder

h0wHigh

Retired Staff
Retired Staff
Aug 5, 2014
103
9
18
hey guys,

Im after pretty much like this from oxide.
http://oxidemod.org/resources/restrict-building.544/

You can restrict no one to build in a certain radius/area. Mostly need it for split/hangar and loot spawns as the lag is bad with many structures. And when a player trys to place a foundation it comes up with a popup "You cannot build here" etc

Cheers.
 

DreTaX

Probably knows the answer...
Administrator
Jun 29, 2014
4,065
4,486
113
At your house.
github.com
hey guys,

Im after pretty much like this from oxide.
http://oxidemod.org/resources/restrict-building.544/

You can restrict no one to build in a certain radius/area. Mostly need it for split/hangar and loot spawns as the lag is bad with many structures. And when a player trys to place a foundation it comes up with a popup "You cannot build here" etc

Cheers.
@Jakkee might be interested to do It. If he isn't, I will do It.
 

Jakkee

Plugin Developer
Plugin Developer
Contributor
Jul 28, 2014
1,465
925
113
Australia
Python:
__title__ = 'TEST'
__author__ = 'Jakkee'
__version__ = '1.0'

import clr
clr.AddReferenceByPartialName("Fougerite")
import Fougerite


class TEST:
    def On_EntityDeployed(self, Player, Entity):
        if Entity.X < 6000 or Entity.Z > -3500:
            if Entity.X > 6200 or Entity.Z < -3750:
                Entity.Destroy()
                Player.Message("You are not allowed to build here")
This is for SmallRad, Not even sure if it works.
I was just using the map from http://www.rustnuts.com/ to get the locations, Also I am not sure on how big you want the area
 
  • Like
Reactions: DreTaX

h0wHigh

Retired Staff
Retired Staff
Aug 5, 2014
103
9
18
I'd rather have it so i can go where i want and do a radius then save it, it wont just be for small rad.
Pretty much similiar to what the oxide link has, is what im after :)
 

MasterPeace

Retired Staff
Retired Staff
Feb 2, 2015
269
68
28
45
Poland
Jakkee: it's bad. Buildings are rotated on map so you can't do this that way. You'll restrict some wrong areas.

DreTax / Snake: Do you know how to make circle area from point? I'm interested in it too because for now I'm using just coords like Jakkee in my server "Museum" and it's working shitty. Building needs to be set up in way of coords (NSWE) to make good square. But of course most of them are not.

We need to find way to select circle area from middle point to make it working proper. Then you would have many fine plugins, like PvE areas, maybe even additional RAD areas.
 

DreTaX

Probably knows the answer...
Administrator
Jun 29, 2014
4,065
4,486
113
At your house.
github.com
The easiest way to make a radius is save where yoz are standing, and then go ahead and on entity deployed check if the distance is smaller than X meters. The other one is Zone3D

Sent from my Samsung Galaxy S4
 

MasterPeace

Retired Staff
Retired Staff
Feb 2, 2015
269
68
28
45
Poland
I can try it now. But don't have many time for this so if I don't do this today I'll probably leave it for weekend.
 

MasterPeace

Retired Staff
Retired Staff
Feb 2, 2015
269
68
28
45
Poland
Code:
def On_EntityDeployed(self, Player, Entity):
               
        #COORD:
        #X6015
        #Z-3095
       
        location = Util.CreateVector(float(6024), float(400), float(-3213))
        entity_loc = Entity.Location
       
        distance = Util.GetVectorsDistance(entity_loc, location)
        Server.Broadcast("Distance: "+str(distance))
        if distance < 100:
            Entity.Destroy()
            Player.MessageFrom("Survival Ducks", DC_Red+"You can't build near Museum!")
Working as expected you know.. But I'm not sure if it will work on linux (UTIL). Also I don't know how to use Zone3D so I don't even try.

@h0wHigh what do you need from this plugin? Only Set / Delete zone with build disabled?
 

h0wHigh

Retired Staff
Retired Staff
Aug 5, 2014
103
9
18
@MasterPeace Yeah set radius/delete and would be good to save it in a ini so i can view the coords to.
Basically want to block around splitrad/hangar and all the loot spawns from people building there.