Poll: Who wants a Protection plugin?
You do not have permission to vote in this poll.
Yes, Gimmeh!
100.00%
5 100.00%
Nah, Meh
0%
0 0%
Total 5 vote(s) 100%
* You voted for this item. [Show Results]

Who wants a Protection plugin here? & A Question
#1
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
Reply
Thanks given by: tonibm19 , NiLSPACE
#2
I believe this is one of the most requested plugins Wink

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.
Reply
Thanks given by: supertransformer
#3
Very good supertransformer Smile! You can do it!
If it succeds it will be awesoneBig Grin!
Reply
Thanks given by:




Users browsing this thread: 2 Guest(s)