setColPolygonHeight | Multi Theft Auto: Wiki Skip to content

setColPolygonHeight

Client-side
Server-side
Shared

This page is incomplete! Help wanted!

Please finish this page using the corresponding Old Wiki article.
Go to Contribution guidelines for more information.


This function is used to change the height of an existing colshape polygon. By default, a colshape polygon is infinitely tall.

Syntax

setColPolygonHeight ( )

Code Examples

server
function setPolygonsHeight ()
for i, v in ipairs (getElementsByType ("colshape")) do
if (getColShapeType (v) == 4) then -- if it's a polygon colshape do it otherwise don't
setColPolygonHeight (v, false, 50)
end
end
end
addEventHandler ("onResourceStart", resourceRoot, setPolygonsHeight)