<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
	<id>https://wiki.multitheftauto.com/api.php?action=feedcontributions&amp;feedformat=atom&amp;user=Riddy</id>
	<title>Multi Theft Auto: Wiki - User contributions [en]</title>
	<link rel="self" type="application/atom+xml" href="https://wiki.multitheftauto.com/api.php?action=feedcontributions&amp;feedformat=atom&amp;user=Riddy"/>
	<link rel="alternate" type="text/html" href="https://wiki.multitheftauto.com/wiki/Special:Contributions/Riddy"/>
	<updated>2026-04-25T11:59:26Z</updated>
	<subtitle>User contributions</subtitle>
	<generator>MediaWiki 1.39.3</generator>
	<entry>
		<id>https://wiki.multitheftauto.com/index.php?title=RemoveColPolygonPoint&amp;diff=74699</id>
		<title>RemoveColPolygonPoint</title>
		<link rel="alternate" type="text/html" href="https://wiki.multitheftauto.com/index.php?title=RemoveColPolygonPoint&amp;diff=74699"/>
		<updated>2022-06-01T04:03:36Z</updated>

		<summary type="html">&lt;p&gt;Riddy: /* Example */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{Server client function}}&lt;br /&gt;
__NOTOC__&lt;br /&gt;
{{New feature/item|3.0158|1.5.7|20397|This function is used to remove a point from an existing [[createColPolygon|colshape polygon]].}}&lt;br /&gt;
&lt;br /&gt;
==Syntax== &lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;&lt;br /&gt;
bool removeColPolygonPoint ( colshape shape, int index )  &lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt; &lt;br /&gt;
{{OOP||[[colshape]]:removePoint||addColPolygonPoint|}}&lt;br /&gt;
&lt;br /&gt;
===Required Arguments=== &lt;br /&gt;
*'''shape:''' The [[colshape]] polygon you wish to remove a point from.&lt;br /&gt;
*'''index:''' The index of the point you wish to remove. The points are indexed in order, with 1 being the first bound point. You can't remove the last 3 points.&lt;br /&gt;
&lt;br /&gt;
===Returns===&lt;br /&gt;
Returns ''true'' if the polygon was changed, ''false'' if invalid arguments were passed.&lt;br /&gt;
&lt;br /&gt;
==Example==&lt;br /&gt;
&amp;lt;section name=&amp;quot;Server&amp;quot; class=&amp;quot;server&amp;quot; show=&amp;quot;true&amp;quot;&amp;gt;&lt;br /&gt;
This example remove a polygon colshape point by command 'removepoint'.&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;&lt;br /&gt;
-- Creates polygon colshape at 0, 0, 4&lt;br /&gt;
local shape = createColPolygon ( -1.08, -0.05, 2.92, -0.05, -1.08, -4.05, -5.08, -0.05, -1.08, 3.95 )&lt;br /&gt;
function removePointToPolygon ( plr, cmd, index )&lt;br /&gt;
    if ( not index ) then&lt;br /&gt;
        -- if index argument after command is not there&lt;br /&gt;
        outputChatBox ( &amp;quot;Correct syntax: /removepoint &amp;lt;index&amp;gt;&amp;quot;, plr, 255, 25, 25 )&lt;br /&gt;
        return false&lt;br /&gt;
    end&lt;br /&gt;
    -- Convert string to number 'index'&lt;br /&gt;
    local index = tonumber ( index )&lt;br /&gt;
    -- Get all polygon colshape points&lt;br /&gt;
    local indexes = #getColPolygonPoints ( shape )&lt;br /&gt;
    if ( index &amp;gt; indexes ) then&lt;br /&gt;
        outputChatBox(&amp;quot;Index point is greater than last index &amp;quot;..indexes, plr, 255, 25, 25)&lt;br /&gt;
        return false&lt;br /&gt;
    else&lt;br /&gt;
        -- Remove polygon point at index&lt;br /&gt;
        removeColPolygonPoint(shape, index)&lt;br /&gt;
    end&lt;br /&gt;
    outputChatBox ( &amp;quot;Point at index &amp;quot;..index..&amp;quot; removed&amp;quot;, plr, 0, 255, 0 )&lt;br /&gt;
end&lt;br /&gt;
addCommandHandler ( &amp;quot;removepoint&amp;quot;, removePointToPolygon )&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&amp;lt;/section&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Requirements==&lt;br /&gt;
{{Requirements|1.5.7-9.20397|1.5.7-9.20397|}}&lt;br /&gt;
&lt;br /&gt;
==See Also==&lt;br /&gt;
{{Collision_shape_functions}}&lt;/div&gt;</summary>
		<author><name>Riddy</name></author>
	</entry>
	<entry>
		<id>https://wiki.multitheftauto.com/index.php?title=GetColPolygonHeight&amp;diff=74698</id>
		<title>GetColPolygonHeight</title>
		<link rel="alternate" type="text/html" href="https://wiki.multitheftauto.com/index.php?title=GetColPolygonHeight&amp;diff=74698"/>
		<updated>2022-06-01T03:51:44Z</updated>

		<summary type="html">&lt;p&gt;Riddy: /* Example */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{Server client function}}&lt;br /&gt;
__NOTOC__&lt;br /&gt;
{{Added feature/item|1.5.9|1.5.8|20807|This function is used to get the height of an existing [[createColPolygon|colshape polygon]].&lt;br /&gt;
By default, a colshape polygon is infinitely tall.}}&lt;br /&gt;
&lt;br /&gt;
==Syntax== &lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;&lt;br /&gt;
float, float getColPolygonHeight ( colshape shape )  &lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt; &lt;br /&gt;
{{OOP||[[colshape]]:getHeight|}}&lt;br /&gt;
&lt;br /&gt;
===Required Arguments=== &lt;br /&gt;
*'''shape:''' The [[colshape]] polygon.&lt;br /&gt;
&lt;br /&gt;
===Returns===&lt;br /&gt;
Returns two [[float]]s, indicating the floor and ceiling of the colshape height, ''false'' if invalid arguments were passed.&lt;br /&gt;
&lt;br /&gt;
==Example==&lt;br /&gt;
&amp;lt;section name=&amp;quot;Server&amp;quot; class=&amp;quot;server&amp;quot; show=&amp;quot;true&amp;quot;&amp;gt;&lt;br /&gt;
This example creates a polygon colshape and show height of it with command 'getpolyheight'.&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;&lt;br /&gt;
 -- Creates polygon colshape at 0, 0, 4&lt;br /&gt;
 local colPoly = createColPolygon ( -1.08, -0.05, 2.92, -0.05, -1.08, -4.05, -5.08, -0.05, -1.08, 3.95 )&lt;br /&gt;
 -- Set its height to 4 unit&lt;br /&gt;
 setColPolygonHeight ( colPoly, 2.32, 7.12 )&lt;br /&gt;
 &lt;br /&gt;
 function showPolyHeight ( player, command )&lt;br /&gt;
     -- Get element position&lt;br /&gt;
     local x, y = getElementPosition ( colPoly )&lt;br /&gt;
     -- Get table floor and ceil of the colshape height and unpack it&lt;br /&gt;
     local z, z1 = unpack ( getColPolygonHeight ( colPoly ) )&lt;br /&gt;
     local heights = z1 - z&lt;br /&gt;
     -- Output it in his chatbox&lt;br /&gt;
     outputChatBox( &amp;quot;The Polygon Colshape at &amp;quot;..x..&amp;quot;, &amp;quot;..y..&amp;quot; height is &amp;quot;..heights, player, 255, 255, 0)&lt;br /&gt;
 end&lt;br /&gt;
 addCommandHandler ( &amp;quot;getpolyheight&amp;quot;, showPolyHeight )&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&amp;lt;/section&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Requirements==&lt;br /&gt;
{{Requirements|1.5.8-9.20807|1.5.8-9.20807|}}&lt;br /&gt;
&lt;br /&gt;
==See Also==&lt;br /&gt;
{{Collision_shape_functions}}&lt;/div&gt;</summary>
		<author><name>Riddy</name></author>
	</entry>
	<entry>
		<id>https://wiki.multitheftauto.com/index.php?title=GetColPolygonHeight&amp;diff=74697</id>
		<title>GetColPolygonHeight</title>
		<link rel="alternate" type="text/html" href="https://wiki.multitheftauto.com/index.php?title=GetColPolygonHeight&amp;diff=74697"/>
		<updated>2022-06-01T03:48:24Z</updated>

		<summary type="html">&lt;p&gt;Riddy: /* Example */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{Server client function}}&lt;br /&gt;
__NOTOC__&lt;br /&gt;
{{Added feature/item|1.5.9|1.5.8|20807|This function is used to get the height of an existing [[createColPolygon|colshape polygon]].&lt;br /&gt;
By default, a colshape polygon is infinitely tall.}}&lt;br /&gt;
&lt;br /&gt;
==Syntax== &lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;&lt;br /&gt;
float, float getColPolygonHeight ( colshape shape )  &lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt; &lt;br /&gt;
{{OOP||[[colshape]]:getHeight|}}&lt;br /&gt;
&lt;br /&gt;
===Required Arguments=== &lt;br /&gt;
*'''shape:''' The [[colshape]] polygon.&lt;br /&gt;
&lt;br /&gt;
===Returns===&lt;br /&gt;
Returns two [[float]]s, indicating the floor and ceiling of the colshape height, ''false'' if invalid arguments were passed.&lt;br /&gt;
&lt;br /&gt;
==Example==&lt;br /&gt;
&amp;lt;section name=&amp;quot;Server&amp;quot; class=&amp;quot;server&amp;quot; show=&amp;quot;true&amp;quot;&amp;gt;&lt;br /&gt;
This example creates a polygon colshape and show height of it with command 'getpolyheight'.&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;&lt;br /&gt;
 -- Creates polygon colshape at 0, 0, 4&lt;br /&gt;
 colPoly = createColPolygon ( -1.08, -0.05, 2.92, -0.05, -1.08, -4.05, -5.08, -0.05, -1.08, 3.95 )&lt;br /&gt;
 -- Set its height to 4 unit&lt;br /&gt;
 setColPolygonHeight ( colPoly, 2.32, 7.12 )&lt;br /&gt;
 &lt;br /&gt;
 function showPolyHeight ( player, command )&lt;br /&gt;
     -- Get element position&lt;br /&gt;
     local x, y = getElementPosition ( colPoly )&lt;br /&gt;
     -- Get table floor and ceil of the colshape height and unpack it&lt;br /&gt;
     local z, z1 = unpack ( getColPolygonHeight ( colPoly ) )&lt;br /&gt;
     local heights = z1 - z&lt;br /&gt;
     -- Output it in his chatbox&lt;br /&gt;
     outputChatBox( &amp;quot;The Polygon Colshape at &amp;quot;..x..&amp;quot;, &amp;quot;..y..&amp;quot; height is &amp;quot;..heights, player, 255, 255, 0)&lt;br /&gt;
 end&lt;br /&gt;
 addCommandHandler ( &amp;quot;getpolyheight&amp;quot;, showPolyHeight )&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&amp;lt;/section&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Requirements==&lt;br /&gt;
{{Requirements|1.5.8-9.20807|1.5.8-9.20807|}}&lt;br /&gt;
&lt;br /&gt;
==See Also==&lt;br /&gt;
{{Collision_shape_functions}}&lt;/div&gt;</summary>
		<author><name>Riddy</name></author>
	</entry>
	<entry>
		<id>https://wiki.multitheftauto.com/index.php?title=GetColPolygonHeight&amp;diff=74696</id>
		<title>GetColPolygonHeight</title>
		<link rel="alternate" type="text/html" href="https://wiki.multitheftauto.com/index.php?title=GetColPolygonHeight&amp;diff=74696"/>
		<updated>2022-06-01T03:47:14Z</updated>

		<summary type="html">&lt;p&gt;Riddy: /* Example */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{Server client function}}&lt;br /&gt;
__NOTOC__&lt;br /&gt;
{{Added feature/item|1.5.9|1.5.8|20807|This function is used to get the height of an existing [[createColPolygon|colshape polygon]].&lt;br /&gt;
By default, a colshape polygon is infinitely tall.}}&lt;br /&gt;
&lt;br /&gt;
==Syntax== &lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;&lt;br /&gt;
float, float getColPolygonHeight ( colshape shape )  &lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt; &lt;br /&gt;
{{OOP||[[colshape]]:getHeight|}}&lt;br /&gt;
&lt;br /&gt;
===Required Arguments=== &lt;br /&gt;
*'''shape:''' The [[colshape]] polygon.&lt;br /&gt;
&lt;br /&gt;
===Returns===&lt;br /&gt;
Returns two [[float]]s, indicating the floor and ceiling of the colshape height, ''false'' if invalid arguments were passed.&lt;br /&gt;
&lt;br /&gt;
==Example==&lt;br /&gt;
&amp;lt;section name=&amp;quot;Server&amp;quot; class=&amp;quot;server&amp;quot; show=&amp;quot;true&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;&lt;br /&gt;
 -- Creates polygon colshape at 0, 0, 4&lt;br /&gt;
 colPoly = createColPolygon ( -1.08, -0.05, 2.92, -0.05, -1.08, -4.05, -5.08, -0.05, -1.08, 3.95 )&lt;br /&gt;
 -- Set its height to 4 unit&lt;br /&gt;
 setColPolygonHeight ( colPoly, 2.32, 7.12 )&lt;br /&gt;
 &lt;br /&gt;
 function showPolyHeight ( player, command )&lt;br /&gt;
     -- Get element position&lt;br /&gt;
     local x, y = getElementPosition ( colPoly )&lt;br /&gt;
     -- Get table floor and ceil of the colshape height and unpack it&lt;br /&gt;
     local z, z1 = unpack ( getColPolygonHeight ( colPoly ) )&lt;br /&gt;
     local heights = z1 - z&lt;br /&gt;
     -- Output it in his chatbox&lt;br /&gt;
     outputChatBox( &amp;quot;The Polygon Colshape at &amp;quot;..x..&amp;quot;, &amp;quot;..y..&amp;quot; height is &amp;quot;..heights, player, 255, 255, 0)&lt;br /&gt;
 end&lt;br /&gt;
 addCommandHandler ( &amp;quot;getpolyheight&amp;quot;, showPolyHeight )&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&amp;lt;/section&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Requirements==&lt;br /&gt;
{{Requirements|1.5.8-9.20807|1.5.8-9.20807|}}&lt;br /&gt;
&lt;br /&gt;
==See Also==&lt;br /&gt;
{{Collision_shape_functions}}&lt;/div&gt;</summary>
		<author><name>Riddy</name></author>
	</entry>
</feed>