ItsJustRonalds Posted June 16, 2017 Share Posted June 16, 2017 So i am making a dayz server and i need to know how you can make it so peopel can't create tents, wire fences, sand bags, safes in safe zone. Link to comment
pa3ck Posted June 16, 2017 Share Posted June 16, 2017 Use colshapes to create safe zones. local shapes = {} local positions = { {123, 456, 50, 50}, {123, 456, 50, 50} } for k, v in ipairs(positions) do local shape = createColRectangle( ... ) table.insert(shapes, shape) end function startBuilding() if not isPlayerInSafezone(player) then -- building code else outputChatBox("in safe zone") end end function isPlayerInSafezone(player) for k, v in ipairs(shapes) do if isElementWithinColShape(player, v ) then return true end end return false end Not a working code, modify it yourself to suit your needs (eg. player element) Link to comment
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now