<?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=Ares</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=Ares"/>
	<link rel="alternate" type="text/html" href="https://wiki.multitheftauto.com/wiki/Special:Contributions/Ares"/>
	<updated>2026-05-02T07:46:44Z</updated>
	<subtitle>User contributions</subtitle>
	<generator>MediaWiki 1.39.3</generator>
	<entry>
		<id>https://wiki.multitheftauto.com/index.php?title=RemoveHex&amp;diff=50462</id>
		<title>RemoveHex</title>
		<link rel="alternate" type="text/html" href="https://wiki.multitheftauto.com/index.php?title=RemoveHex&amp;diff=50462"/>
		<updated>2017-02-16T12:58:46Z</updated>

		<summary type="html">&lt;p&gt;Ares: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{Useful Function}}&lt;br /&gt;
&amp;lt;lowercasetitle&amp;gt;&amp;lt;/lowercasetitle&amp;gt;&lt;br /&gt;
__NOTOC__&lt;br /&gt;
This function is used to remove hex color codes from strings.&lt;br /&gt;
&lt;br /&gt;
==Syntax==&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;string removeHex (string text)&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Required Arguments===&lt;br /&gt;
* '''text''': The text from which you want to remove the hex codes.&lt;br /&gt;
&lt;br /&gt;
===Returns===&lt;br /&gt;
Returns the modified string if the conversion was successful, false otherwise.&lt;br /&gt;
&lt;br /&gt;
==Code==&lt;br /&gt;
&amp;lt;section name=&amp;quot;Code&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 removeHex (text)&lt;br /&gt;
    if not type(text) == &amp;quot;string&amp;quot; then return false end&lt;br /&gt;
    repeat text = text:gsub(&amp;quot;#%x%x%x%x%x%x&amp;quot;, &amp;quot;&amp;quot;) until not text:find(&amp;quot;#%x%x%x%x%x%x&amp;quot;)&lt;br /&gt;
    return text&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&amp;quot; class=&amp;quot;server&amp;quot; show=&amp;quot;true&amp;quot;&amp;gt;&lt;br /&gt;
This example remove color coding from player nickname when he join the server.&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;&lt;br /&gt;
function nickname()&lt;br /&gt;
   local name = getPlayerName(source)&lt;br /&gt;
   local new = removeHex (name)&lt;br /&gt;
   if (new ~= name) then&lt;br /&gt;
      setPlayerName(source, new)&lt;br /&gt;
   end&lt;br /&gt;
end&lt;br /&gt;
addEventHandler(&amp;quot;onPlayerJoin&amp;quot;, root, nickname)&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&amp;lt;/section&amp;gt;&lt;br /&gt;
Author: Walid (modified by Ares)&lt;br /&gt;
==See Also==&lt;br /&gt;
{{Useful_Functions}}&lt;/div&gt;</summary>
		<author><name>Ares</name></author>
	</entry>
	<entry>
		<id>https://wiki.multitheftauto.com/index.php?title=RemoveHex&amp;diff=50371</id>
		<title>RemoveHex</title>
		<link rel="alternate" type="text/html" href="https://wiki.multitheftauto.com/index.php?title=RemoveHex&amp;diff=50371"/>
		<updated>2017-01-24T18:35:01Z</updated>

		<summary type="html">&lt;p&gt;Ares: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{Useful Function}}&lt;br /&gt;
&amp;lt;lowercasetitle&amp;gt;&amp;lt;/lowercasetitle&amp;gt;&lt;br /&gt;
__NOTOC__&lt;br /&gt;
This function is used to remove hex color codes from strings.&lt;br /&gt;
&lt;br /&gt;
==Syntax==&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;string removeHex (string text)&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Required Arguments===&lt;br /&gt;
* '''text''': The text from which you want to remove the hex codes.&lt;br /&gt;
&lt;br /&gt;
===Returns===&lt;br /&gt;
Returns the modified string if the conversion was successful, false otherwise.&lt;br /&gt;
&lt;br /&gt;
==Code==&lt;br /&gt;
&amp;lt;section name=&amp;quot;Code&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 removeHex (text)&lt;br /&gt;
    if not type(text) == &amp;quot;string&amp;quot; then return false end&lt;br /&gt;
    while true do&lt;br /&gt;
        text, k = string.gsub(text, &amp;quot;#%x%x%x%x%x%x&amp;quot;, &amp;quot;&amp;quot;)&lt;br /&gt;
        if (k==0) then&lt;br /&gt;
            break&lt;br /&gt;
        end&lt;br /&gt;
    end&lt;br /&gt;
    return text&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&amp;quot; class=&amp;quot;server&amp;quot; show=&amp;quot;true&amp;quot;&amp;gt;&lt;br /&gt;
This example remove color coding from player nickname when he join the server.&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;&lt;br /&gt;
function nickname()&lt;br /&gt;
   local name = getPlayerName(source)&lt;br /&gt;
   local new = removeHex (name)&lt;br /&gt;
   if (new ~= name) then&lt;br /&gt;
      setPlayerName(source, new)&lt;br /&gt;
   end&lt;br /&gt;
end&lt;br /&gt;
addEventHandler(&amp;quot;onPlayerJoin&amp;quot;, root, nickname)&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&amp;lt;/section&amp;gt;&lt;br /&gt;
Author: Walid (modified by Ares)&lt;br /&gt;
==See Also==&lt;br /&gt;
{{Useful_Functions}}&lt;/div&gt;</summary>
		<author><name>Ares</name></author>
	</entry>
	<entry>
		<id>https://wiki.multitheftauto.com/index.php?title=RemoveHex&amp;diff=50370</id>
		<title>RemoveHex</title>
		<link rel="alternate" type="text/html" href="https://wiki.multitheftauto.com/index.php?title=RemoveHex&amp;diff=50370"/>
		<updated>2017-01-24T18:34:42Z</updated>

		<summary type="html">&lt;p&gt;Ares: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{Useful Function}}&lt;br /&gt;
&amp;lt;lowercasetitle&amp;gt;&amp;lt;/lowercasetitle&amp;gt;&lt;br /&gt;
__NOTOC__&lt;br /&gt;
This function is used to remove hex color codes from strings.&lt;br /&gt;
&lt;br /&gt;
==Syntax==&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;string removeHex (string text)&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Required Arguments===&lt;br /&gt;
* '''text''': The text from which you want to remove the hex codes.&lt;br /&gt;
&lt;br /&gt;
===Returns===&lt;br /&gt;
Returns the modified string if the conversion was successful, false otherwise.&lt;br /&gt;
&lt;br /&gt;
==Code==&lt;br /&gt;
&amp;lt;section name=&amp;quot;Code&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 removeHex (text)&lt;br /&gt;
    if not type(text) == &amp;quot;string&amp;quot; then return false end&lt;br /&gt;
    while true do&lt;br /&gt;
        text, k = string.gsub(text, &amp;quot;#%x%x%x%x%x%x&amp;quot;, &amp;quot;&amp;quot;)&lt;br /&gt;
        if (k==0) then&lt;br /&gt;
            break&lt;br /&gt;
        end&lt;br /&gt;
    end&lt;br /&gt;
    return text&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&amp;quot; class=&amp;quot;server&amp;quot; show=&amp;quot;true&amp;quot;&amp;gt;&lt;br /&gt;
This example remove color coding from player nickname when he join the server.&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;&lt;br /&gt;
function nickname()&lt;br /&gt;
   local name = getPlayerName(source)&lt;br /&gt;
   local new = removeHex (name)&lt;br /&gt;
   if (new ~= name) then&lt;br /&gt;
      setPlayerName(source, new)&lt;br /&gt;
   end&lt;br /&gt;
end&lt;br /&gt;
addEventHandler(&amp;quot;onPlayerJoin&amp;quot;, root, nickname)&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&amp;lt;/section&amp;gt;&lt;br /&gt;
Author: Walid&lt;br /&gt;
==See Also==&lt;br /&gt;
{{Useful_Functions}}&lt;/div&gt;</summary>
		<author><name>Ares</name></author>
	</entry>
	<entry>
		<id>https://wiki.multitheftauto.com/index.php?title=RemoveHex&amp;diff=50369</id>
		<title>RemoveHex</title>
		<link rel="alternate" type="text/html" href="https://wiki.multitheftauto.com/index.php?title=RemoveHex&amp;diff=50369"/>
		<updated>2017-01-24T18:33:58Z</updated>

		<summary type="html">&lt;p&gt;Ares: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{Useful Function}}&lt;br /&gt;
&amp;lt;lowercasetitle&amp;gt;&amp;lt;/lowercasetitle&amp;gt;&lt;br /&gt;
__NOTOC__&lt;br /&gt;
This function is used to remove hex color codes from strings.&lt;br /&gt;
&lt;br /&gt;
==Syntax==&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;string removeHex (string text)&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Required Arguments===&lt;br /&gt;
* '''text''': The text from which you want to remove the hex codes.&lt;br /&gt;
&lt;br /&gt;
===Returns===&lt;br /&gt;
Returns the modified string if the conversion was successful, false otherwise.&lt;br /&gt;
&lt;br /&gt;
==Code==&lt;br /&gt;
&amp;lt;section name=&amp;quot;Code&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 removeHex (text)&lt;br /&gt;
    if not type(text) == &amp;quot;string&amp;quot; then return false end&lt;br /&gt;
    while true do&lt;br /&gt;
        number, k = string.gsub(text, &amp;quot;#%x%x%x%x%x%x&amp;quot;, &amp;quot;&amp;quot;)&lt;br /&gt;
        if (k==0) then&lt;br /&gt;
            break&lt;br /&gt;
        end&lt;br /&gt;
    end&lt;br /&gt;
    return text&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&amp;quot; class=&amp;quot;server&amp;quot; show=&amp;quot;true&amp;quot;&amp;gt;&lt;br /&gt;
This example remove color coding from player nickname when he join the server.&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;&lt;br /&gt;
function nickname()&lt;br /&gt;
   local name = getPlayerName(source)&lt;br /&gt;
   local new = removeHex (name)&lt;br /&gt;
   if (new ~= name) then&lt;br /&gt;
      setPlayerName(source, new)&lt;br /&gt;
   end&lt;br /&gt;
end&lt;br /&gt;
addEventHandler(&amp;quot;onPlayerJoin&amp;quot;, root, nickname)&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&amp;lt;/section&amp;gt;&lt;br /&gt;
Author: Walid&lt;br /&gt;
==See Also==&lt;br /&gt;
{{Useful_Functions}}&lt;/div&gt;</summary>
		<author><name>Ares</name></author>
	</entry>
</feed>