- Documentation
- Shared functions
- isInsideColShape
Function
isInsideColShape
Checks whether a point (x, y, z) lies inside a zone. It does not need anyone standing in it - it computes the geometry only.
Syntax
bool isInsideColShape(colshape theShape, float posX, float posY [, float posZ = 0])Arguments
theShapecolshape- The zone.
posXfloat- Point X.
posYfloat- Point Y.
posZfloat, optional = 0- Point Z.
Returns
true when the point is inside.
Example
local zone = createColRectangle(0, 0, 100, 100)
addCommandHandler("czywstrefie", function(player)
local x, y, z = getElementPosition(player)
outputChatBox(tostring(isInsideColShape(zone, x, y, z)), player)
end)