![]() |
Who wants a Protection plugin here? & A Question - Printable Version +- Cuberite Forum (https://forum.cuberite.org) +-- Forum: Plugins (https://forum.cuberite.org/forum-1.html) +--- Forum: Plugin Discussion (https://forum.cuberite.org/forum-8.html) +--- Thread: Who wants a Protection plugin here? & A Question (/thread-875.html) |
Who wants a Protection plugin here? & A Question - supertransformer - 05-07-2013 I'm making a protection plugin, how many people will use it/want it here? It takes alot of time & its complicated xD & while im here i will ask a question. Is this a good idea to check if the X/Y/Z coords are in the protected area? x = 168.45539 CodsProtectedX = 169.45538 if (x<CodsProtectedX) then -- Yup, it should block the aciton. else -- Nope, the player can place the block/dig it end RE: Who wants a Protection plugin here? & A Question - xoft - 05-07-2013 I believe this is one of the most requested plugins ![]() I don't quite follow your code. Are you making just one comparison of the coord? then you're "protecting" too much - nothing to the east (or whatever direction it is) of this coord can't be touched. You're much better off using a cCuboid class for storing the coords - it can store two pairs of XYZ coords, sort them and then it takes just a function call to know whether a point is inside or not. The docs on the cCuboid class should be up to date; however I'm thinking about adding more IsInside() function flavors - ones taking a set of three coords rather than a vector. RE: Who wants a Protection plugin here? & A Question - tonibm19 - 05-07-2013 Very good supertransformer ![]() If it succeds it will be awesone ![]() |