- Documentation
- Client functions
- createColBox
Function
createColBox
Creates a client box zone centred at (x, y, z), rotated around the vertical axis - more convenient than createColCuboid when a building stands at an angle.
Syntax
colshape createColBox(float x, float y, float z, float width, float depth, float height [, float rotation = 0])Arguments
xfloat- Centre X.
yfloat- Centre Y.
zfloat- Centre Z.
widthfloat- Width (X before rotation).
depthfloat- Depth (Y before rotation).
heightfloat- Height.
rotationfloat, optional = 0- Rotation in degrees around the Z axis.
Returns
The new zone.
Example
local shop = createColBox(2244, -1665, 15, 10, 6, 4, 45)
addEventHandler("onClientColShapeHit", shop, function(element)
if element == localPlayer then outputChatBox("Sklep: nacisnij E") end
end)