<?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=ALCKASE+R</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=ALCKASE+R"/>
	<link rel="alternate" type="text/html" href="https://wiki.multitheftauto.com/wiki/Special:Contributions/ALCKASE_R"/>
	<updated>2026-06-11T02:22:25Z</updated>
	<subtitle>User contributions</subtitle>
	<generator>MediaWiki 1.39.3</generator>
	<entry>
		<id>https://wiki.multitheftauto.com/index.php?title=CountPlayersInRange&amp;diff=44380</id>
		<title>CountPlayersInRange</title>
		<link rel="alternate" type="text/html" href="https://wiki.multitheftauto.com/index.php?title=CountPlayersInRange&amp;diff=44380"/>
		<updated>2015-02-08T17:39:24Z</updated>

		<summary type="html">&lt;p&gt;ALCKASE R: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;__NOTOC__&lt;br /&gt;
{{Useful Function}}&lt;br /&gt;
This function return the number of players that are within certain range of specific position .&lt;br /&gt;
==Syntax==&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;&lt;br /&gt;
int countPlayersInRange(float x, float y, float z, float range)&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Required Arguments===&lt;br /&gt;
* '''x''' : The x coordinate of the destination .&lt;br /&gt;
* '''y''' : The y coordinate of the destination .&lt;br /&gt;
* '''z''' : The z coordinate of the destination .&lt;br /&gt;
* '''range''' : Range size .&lt;br /&gt;
&lt;br /&gt;
==Code==&lt;br /&gt;
&amp;lt;section name=&amp;quot;Function source&amp;quot; class=&amp;quot;both&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;
function countPlayersInRange(x, y, z, range)&lt;br /&gt;
    if tonumber(x..y..z..range) then&lt;br /&gt;
        local add = 0&lt;br /&gt;
        for _, v in ipairs(getElementsByType(&amp;quot;player&amp;quot;)) do&lt;br /&gt;
            local px, py, pz = getElementPosition( v )&lt;br /&gt;
            if getDistanceBetweenPoints3D(px, py, pz, tonumber(x), tonumber(y), tonumber(z)) &amp;lt;= tonumber(range) then&lt;br /&gt;
                add = add + 1&lt;br /&gt;
            end&lt;br /&gt;
        end&lt;br /&gt;
        return add&lt;br /&gt;
    else&lt;br /&gt;
        return false&lt;br /&gt;
    end&lt;br /&gt;
end&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&amp;lt;/section&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Example==&lt;br /&gt;
&amp;lt;section name=&amp;quot;Server Side [Example]&amp;quot; class=&amp;quot;server&amp;quot; show=&amp;quot;true&amp;quot;&amp;gt;&lt;br /&gt;
This Example get players in range and out put it in chat .&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;&lt;br /&gt;
addCommandHandler('EH10',&lt;br /&gt;
function (player)&lt;br /&gt;
    local number = countPlayersInRange(x, y, z, range)&lt;br /&gt;
        outputChatBox(&amp;quot;Number : &amp;quot; .. number .. &amp;quot; .&amp;quot;, player, 255, 0, 0, true)&lt;br /&gt;
    end&lt;br /&gt;
)&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&amp;lt;/section&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
* [ Created By ; EH10 ]&lt;br /&gt;
Skype ; maxurmaxur&lt;br /&gt;
&lt;br /&gt;
==See Also==&lt;br /&gt;
{{Useful_Functions}}&lt;/div&gt;</summary>
		<author><name>ALCKASE R</name></author>
	</entry>
	<entry>
		<id>https://wiki.multitheftauto.com/index.php?title=SetElementSpeed&amp;diff=44379</id>
		<title>SetElementSpeed</title>
		<link rel="alternate" type="text/html" href="https://wiki.multitheftauto.com/index.php?title=SetElementSpeed&amp;diff=44379"/>
		<updated>2015-02-08T17:36:38Z</updated>

		<summary type="html">&lt;p&gt;ALCKASE R: ALCKASE R moved page SetElementSpeed to CountPlayersInRange&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;#REDIRECT [[CountPlayersInRange]]&lt;/div&gt;</summary>
		<author><name>ALCKASE R</name></author>
	</entry>
	<entry>
		<id>https://wiki.multitheftauto.com/index.php?title=CountPlayersInRange&amp;diff=44378</id>
		<title>CountPlayersInRange</title>
		<link rel="alternate" type="text/html" href="https://wiki.multitheftauto.com/index.php?title=CountPlayersInRange&amp;diff=44378"/>
		<updated>2015-02-08T17:36:38Z</updated>

		<summary type="html">&lt;p&gt;ALCKASE R: ALCKASE R moved page SetElementSpeed to CountPlayersInRange&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;__NOTOC__&lt;br /&gt;
{{Useful Function}}&lt;br /&gt;
This function return the number of players that are within certain range of specific position .&lt;br /&gt;
==Syntax==&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;&lt;br /&gt;
int countPlayersInRange(float x, float y, float z, float range)&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Required Arguments===&lt;br /&gt;
* '''x''' : The x coordinate of the destination .&lt;br /&gt;
* '''y''' : The y coordinate of the destination .&lt;br /&gt;
* '''z''' : The z coordinate of the destination .&lt;br /&gt;
* '''range''' : Range size .&lt;br /&gt;
&lt;br /&gt;
==Code==&lt;br /&gt;
&amp;lt;section name=&amp;quot;Function source&amp;quot; class=&amp;quot;both&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;
function countPlayersInRange(x, y, z, range)&lt;br /&gt;
    if tonumber(x..y..z..range) then&lt;br /&gt;
        local add = 0&lt;br /&gt;
        for _, v in ipairs(getElementsByType(&amp;quot;player&amp;quot;)) do&lt;br /&gt;
            local px, py, pz = getElementPosition( v )&lt;br /&gt;
            if getDistanceBetweenPoints3D(px, py, pz, tonumber(x), tonumber(y), tonumber(z)) &amp;lt;= tonumber(range) then&lt;br /&gt;
                add = add + 1&lt;br /&gt;
            end&lt;br /&gt;
        end&lt;br /&gt;
        return add&lt;br /&gt;
    else&lt;br /&gt;
        return false&lt;br /&gt;
    end&lt;br /&gt;
end&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&amp;lt;/section&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Example==&lt;br /&gt;
&amp;lt;section name=&amp;quot;Server Side [Example]&amp;quot; class=&amp;quot;server&amp;quot; show=&amp;quot;true&amp;quot;&amp;gt;&lt;br /&gt;
This Example get players in range and out put it in chat .&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;&lt;br /&gt;
addCommandHandler('EH10',&lt;br /&gt;
function (player)&lt;br /&gt;
    local number = countPlayersInRange(x, y, z, range)&lt;br /&gt;
        outputChatBox(&amp;quot;Number : &amp;quot; .. number .. &amp;quot; .&amp;quot;, player, 255, 0, 0, true)&lt;br /&gt;
    end&lt;br /&gt;
)&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&amp;lt;/section&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Created By ; EH10&lt;br /&gt;
&lt;br /&gt;
==See Also==&lt;br /&gt;
{{Useful_Functions}}&lt;/div&gt;</summary>
		<author><name>ALCKASE R</name></author>
	</entry>
	<entry>
		<id>https://wiki.multitheftauto.com/index.php?title=CountPlayersInRange&amp;diff=44377</id>
		<title>CountPlayersInRange</title>
		<link rel="alternate" type="text/html" href="https://wiki.multitheftauto.com/index.php?title=CountPlayersInRange&amp;diff=44377"/>
		<updated>2015-02-08T17:25:25Z</updated>

		<summary type="html">&lt;p&gt;ALCKASE R: countPlayersInRange&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;__NOTOC__&lt;br /&gt;
{{Useful Function}}&lt;br /&gt;
This function return the number of players that are within certain range of specific position .&lt;br /&gt;
==Syntax==&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;&lt;br /&gt;
int countPlayersInRange(float x, float y, float z, float range)&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Required Arguments===&lt;br /&gt;
* '''x''' : The x coordinate of the destination .&lt;br /&gt;
* '''y''' : The y coordinate of the destination .&lt;br /&gt;
* '''z''' : The z coordinate of the destination .&lt;br /&gt;
* '''range''' : Range size .&lt;br /&gt;
&lt;br /&gt;
==Code==&lt;br /&gt;
&amp;lt;section name=&amp;quot;Function source&amp;quot; class=&amp;quot;both&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;
function countPlayersInRange(x, y, z, range)&lt;br /&gt;
    if tonumber(x..y..z..range) then&lt;br /&gt;
        local add = 0&lt;br /&gt;
        for _, v in ipairs(getElementsByType(&amp;quot;player&amp;quot;)) do&lt;br /&gt;
            local px, py, pz = getElementPosition( v )&lt;br /&gt;
            if getDistanceBetweenPoints3D(px, py, pz, tonumber(x), tonumber(y), tonumber(z)) &amp;lt;= tonumber(range) then&lt;br /&gt;
                add = add + 1&lt;br /&gt;
            end&lt;br /&gt;
        end&lt;br /&gt;
        return add&lt;br /&gt;
    else&lt;br /&gt;
        return false&lt;br /&gt;
    end&lt;br /&gt;
end&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&amp;lt;/section&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Example==&lt;br /&gt;
&amp;lt;section name=&amp;quot;Server Side [Example]&amp;quot; class=&amp;quot;server&amp;quot; show=&amp;quot;true&amp;quot;&amp;gt;&lt;br /&gt;
This Example get players in range and out put it in chat .&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;&lt;br /&gt;
addCommandHandler('EH10',&lt;br /&gt;
function (player)&lt;br /&gt;
    local number = countPlayersInRange(x, y, z, range)&lt;br /&gt;
        outputChatBox(&amp;quot;Number : &amp;quot; .. number .. &amp;quot; .&amp;quot;, player, 255, 0, 0, true)&lt;br /&gt;
    end&lt;br /&gt;
)&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&amp;lt;/section&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Created By ; EH10&lt;br /&gt;
&lt;br /&gt;
==See Also==&lt;br /&gt;
{{Useful_Functions}}&lt;/div&gt;</summary>
		<author><name>ALCKASE R</name></author>
	</entry>
	<entry>
		<id>https://wiki.multitheftauto.com/index.php?title=Talk:Useful_Functions&amp;diff=44249</id>
		<title>Talk:Useful Functions</title>
		<link rel="alternate" type="text/html" href="https://wiki.multitheftauto.com/index.php?title=Talk:Useful_Functions&amp;diff=44249"/>
		<updated>2015-02-05T12:18:25Z</updated>

		<summary type="html">&lt;p&gt;ALCKASE R: ALCKASE R moved page Talk:Useful Functions to Talk:WWE&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;there i wrote isElementInPhotograph()&lt;br /&gt;
enjoy&lt;br /&gt;
[[User:Drline|Drline]] 04:44, 30 October 2012 (UTC)&lt;br /&gt;
&lt;br /&gt;
== countPlayersInWater ==&lt;br /&gt;
&lt;br /&gt;
This function is for returning the number of players in the water.&lt;br /&gt;
==Syntax==&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;int countPlayersInWater( )&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Returns===&lt;br /&gt;
Returns an integer containing the number of players in the water.&lt;br /&gt;
&lt;br /&gt;
==Code==&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;&lt;br /&gt;
function countPlayersInWater( )&lt;br /&gt;
    local count = 0&lt;br /&gt;
	for i,player in ipairs(getElementsByType(&amp;quot;player&amp;quot;)) do&lt;br /&gt;
		if isElementInWater(player) then&lt;br /&gt;
			count = count + 1&lt;br /&gt;
		end&lt;br /&gt;
	end&lt;br /&gt;
    return count&lt;br /&gt;
end&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Example==&lt;br /&gt;
&amp;lt;section name=&amp;quot;Example&amp;quot; class=&amp;quot;both&amp;quot; show=&amp;quot;true&amp;quot;&amp;gt; &lt;br /&gt;
This example adds a command in the console to find out how many players are on your team, clientside&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;&lt;br /&gt;
outputChatBox(&amp;quot;Number of Players in Water : &amp;quot;.. countPlayersInWater( ))&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&amp;lt;/section&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==See Also==&lt;br /&gt;
{{Useful_Functions}}&lt;/div&gt;</summary>
		<author><name>ALCKASE R</name></author>
	</entry>
	<entry>
		<id>https://wiki.multitheftauto.com/index.php?title=Useful_Functions&amp;diff=44247</id>
		<title>Useful Functions</title>
		<link rel="alternate" type="text/html" href="https://wiki.multitheftauto.com/index.php?title=Useful_Functions&amp;diff=44247"/>
		<updated>2015-02-05T12:18:25Z</updated>

		<summary type="html">&lt;p&gt;ALCKASE R: ALCKASE R moved page Useful Functions to WWE&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;TGRBH H3&lt;/div&gt;</summary>
		<author><name>ALCKASE R</name></author>
	</entry>
	<entry>
		<id>https://wiki.multitheftauto.com/index.php?title=Useful_Functions&amp;diff=44246</id>
		<title>Useful Functions</title>
		<link rel="alternate" type="text/html" href="https://wiki.multitheftauto.com/index.php?title=Useful_Functions&amp;diff=44246"/>
		<updated>2015-02-05T12:18:01Z</updated>

		<summary type="html">&lt;p&gt;ALCKASE R: WWE&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;TGRBH H3&lt;/div&gt;</summary>
		<author><name>ALCKASE R</name></author>
	</entry>
	<entry>
		<id>https://wiki.multitheftauto.com/index.php?title=SetBindKeyWindowShow&amp;diff=44245</id>
		<title>SetBindKeyWindowShow</title>
		<link rel="alternate" type="text/html" href="https://wiki.multitheftauto.com/index.php?title=SetBindKeyWindowShow&amp;diff=44245"/>
		<updated>2015-02-05T12:16:48Z</updated>

		<summary type="html">&lt;p&gt;ALCKASE R: SAZA&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;TGRBH&lt;/div&gt;</summary>
		<author><name>ALCKASE R</name></author>
	</entry>
</feed>