<?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=Crytx</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=Crytx"/>
	<link rel="alternate" type="text/html" href="https://wiki.multitheftauto.com/wiki/Special:Contributions/Crytx"/>
	<updated>2026-04-24T04:41:46Z</updated>
	<subtitle>User contributions</subtitle>
	<generator>MediaWiki 1.39.3</generator>
	<entry>
		<id>https://wiki.multitheftauto.com/index.php?title=RequestBrowserDomains&amp;diff=63551</id>
		<title>RequestBrowserDomains</title>
		<link rel="alternate" type="text/html" href="https://wiki.multitheftauto.com/index.php?title=RequestBrowserDomains&amp;diff=63551"/>
		<updated>2019-07-31T08:47:56Z</updated>

		<summary type="html">&lt;p&gt;Crytx: /* Optional Arguments */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;__NOTOC__&lt;br /&gt;
{{Client function}}&lt;br /&gt;
{{New feature/item|3.0150|1.5||&lt;br /&gt;
This function opens a request window in order to accept the requested remote URLs.&lt;br /&gt;
{{Note|You must use this function prior to calling [[loadBrowserURL]] because every domain, with exceptions in the whitelist [https://github.com/multitheftauto/mtasa-blue/blob/e11685cab4beb7958ab202261f9c9d9b4ce71e58/Client/cefweb/CWebCore.cpp#L280-L283 here] and [https://github.com/multitheftauto/mtasa-blue/blob/e11685cab4beb7958ab202261f9c9d9b4ce71e58/Client/cefweb/CWebCore.cpp#L205-L206 there], is blocked by default.}}&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
==Syntax==&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;bool requestBrowserDomains ( table pages [, bool parseAsURL = false, function callback ] )&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
{{OOP||[[Element/Browser|Browser]].requestDomains}}&lt;br /&gt;
&lt;br /&gt;
===Required Arguments===&lt;br /&gt;
*'''pages:''' A table containing all domains&lt;br /&gt;
&lt;br /&gt;
===Optional Arguments===&lt;br /&gt;
*'''parseAsURL:''' ''true'' if the passed addresses should be converted from URLs, ''false'' otherwise.&lt;br /&gt;
*'''callback:''' A callback function that is called as soon as the result is available&lt;br /&gt;
Syntax:&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;function(bool wasAccepted, table new_domains)&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Returns===&lt;br /&gt;
Returns '''true''', if the string was successfully read, '''false''' otherwise.&lt;br /&gt;
&lt;br /&gt;
==Example==&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;requestBrowserDomains({ &amp;quot;mtasa.com&amp;quot; }) -- request browser domain&lt;br /&gt;
showCursor(true) -- show cursor&lt;br /&gt;
addEventHandler(&amp;quot;onClientBrowserWhitelistChange&amp;quot;, root,&lt;br /&gt;
   function(newDomains)&lt;br /&gt;
     if newDomains[1] == &amp;quot;mtasa.com&amp;quot; then&lt;br /&gt;
       local browser = createBrowser(1280, 720, false, false) -- create browser&lt;br /&gt;
       loadBrowserURL(browser, &amp;quot;http://mtasa.com/&amp;quot;) -- load browser url&lt;br /&gt;
   end&lt;br /&gt;
end&lt;br /&gt;
)&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==See also==&lt;br /&gt;
{{CEF_functions}}&lt;br /&gt;
&lt;br /&gt;
[[hu:requestBrowserDomains]]&lt;/div&gt;</summary>
		<author><name>Crytx</name></author>
	</entry>
	<entry>
		<id>https://wiki.multitheftauto.com/index.php?title=OnPickupHit&amp;diff=57215</id>
		<title>OnPickupHit</title>
		<link rel="alternate" type="text/html" href="https://wiki.multitheftauto.com/index.php?title=OnPickupHit&amp;diff=57215"/>
		<updated>2018-07-31T11:21:41Z</updated>

		<summary type="html">&lt;p&gt;Crytx: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;__NOTOC__&lt;br /&gt;
{{Server event}} &lt;br /&gt;
This event is triggered when a [[player]] hits a [[pickup]].&lt;br /&gt;
&lt;br /&gt;
==Parameters==&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;&lt;br /&gt;
player thePlayer&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt; &lt;br /&gt;
&lt;br /&gt;
*'''thePlayer''': a [[player]] element referring to the player who moved over the [[pickup]].&lt;br /&gt;
&lt;br /&gt;
==Source==&lt;br /&gt;
The [[event system#Event source|source]] of this event is the [[pickup]] that was hit by the player.&lt;br /&gt;
&lt;br /&gt;
==Cancel effect==&lt;br /&gt;
If this event is [[Event system#Canceling|canceled]], the pickup does not disappear and the player does not receive its bonus.&lt;br /&gt;
&lt;br /&gt;
==Example== &lt;br /&gt;
This example creates a pickup and outputs a message to the chat box when a player walks over it.&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;&lt;br /&gt;
local thePickup = createPickup( 10, 10, 10, 2, 31, 3000, 50 ) -- Create a M4 weapon pickup when the script starts&lt;br /&gt;
&lt;br /&gt;
function pickedUpWeaponCheck( player )&lt;br /&gt;
    outputChatBox( &amp;quot;You have picked up a M4.&amp;quot;, player ) -- Output a message to the chatbox&lt;br /&gt;
end&lt;br /&gt;
addEventHandler( &amp;quot;onPickupHit&amp;quot;, thePickup, pickedUpWeaponCheck )&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==See Also==&lt;br /&gt;
{{Pickup events}}&lt;/div&gt;</summary>
		<author><name>Crytx</name></author>
	</entry>
	<entry>
		<id>https://wiki.multitheftauto.com/index.php?title=OnPickupHit&amp;diff=57214</id>
		<title>OnPickupHit</title>
		<link rel="alternate" type="text/html" href="https://wiki.multitheftauto.com/index.php?title=OnPickupHit&amp;diff=57214"/>
		<updated>2018-07-31T11:20:44Z</updated>

		<summary type="html">&lt;p&gt;Crytx: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;__NOTOC__&lt;br /&gt;
{{Server event}} &lt;br /&gt;
This event is triggered when a [[pickup]] hits a [[player]].&lt;br /&gt;
&lt;br /&gt;
==Parameters==&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;&lt;br /&gt;
player thePlayer&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt; &lt;br /&gt;
&lt;br /&gt;
*'''thePlayer''': a [[player]] element referring to the player who moved over the [[pickup]].&lt;br /&gt;
&lt;br /&gt;
==Source==&lt;br /&gt;
The [[event system#Event source|source]] of this event is the [[pickup]] that was hit by the player.&lt;br /&gt;
&lt;br /&gt;
==Cancel effect==&lt;br /&gt;
If this event is [[Event system#Canceling|canceled]], the pickup does not disappear and the player does not receive its bonus.&lt;br /&gt;
&lt;br /&gt;
==Example== &lt;br /&gt;
This example creates a pickup and outputs a message to the chat box when a player walks over it.&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;&lt;br /&gt;
local thePickup = createPickup( 10, 10, 10, 2, 31, 3000, 50 ) -- Create a M4 weapon pickup when the script starts&lt;br /&gt;
&lt;br /&gt;
function pickedUpWeaponCheck( player )&lt;br /&gt;
    outputChatBox( &amp;quot;You have picked up a M4.&amp;quot;, player ) -- Output a message to the chatbox&lt;br /&gt;
end&lt;br /&gt;
addEventHandler( &amp;quot;onPickupHit&amp;quot;, thePickup, pickedUpWeaponCheck )&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==See Also==&lt;br /&gt;
{{Pickup events}}&lt;/div&gt;</summary>
		<author><name>Crytx</name></author>
	</entry>
	<entry>
		<id>https://wiki.multitheftauto.com/index.php?title=GetElementBoundingBox&amp;diff=55620</id>
		<title>GetElementBoundingBox</title>
		<link rel="alternate" type="text/html" href="https://wiki.multitheftauto.com/index.php?title=GetElementBoundingBox&amp;diff=55620"/>
		<updated>2018-07-03T05:48:26Z</updated>

		<summary type="html">&lt;p&gt;Crytx: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{Client function}}&lt;br /&gt;
__NOTOC__&lt;br /&gt;
This function returns the minimum and maximum coordinates of an element's bounding box.&lt;br /&gt;
&lt;br /&gt;
It should be noted that the values returned are relative to the position of the element, and as such if you wish to get world coordinates for drawing,...etc, you should retrieve the position of the element and add the returned values onto that.&lt;br /&gt;
&lt;br /&gt;
'''Note:''' The element must be streamed in for this function to work.&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 float float float float getElementBoundingBox ( element theElement )&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt; &lt;br /&gt;
{{OOP||[[element]]:getBoundingBox}}&lt;br /&gt;
&lt;br /&gt;
===Required Arguments===&lt;br /&gt;
'''theElement:''' the element whose bounding box we want to get.&lt;br /&gt;
&lt;br /&gt;
===Returns===&lt;br /&gt;
*Returns ''min x, min y, min z, max x, max y, max z'' if the passed element is valid and streamed in, ''false'' otherwise.&lt;br /&gt;
&lt;br /&gt;
==Example== &lt;br /&gt;
This example outputs to chatbox the minimum and the maximum coordinates of an element.&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;&lt;br /&gt;
function minMaxOutput ( theElement )&lt;br /&gt;
    local x0, y0, z0, x1, y1, z1 = getElementBoundingBox ( theElement )&lt;br /&gt;
    if ( x0 ) then&lt;br /&gt;
        outputChatBox ( &amp;quot;The coords are: &amp;quot; .. x0 .. &amp;quot;, &amp;quot; .. y0 .. &amp;quot;, &amp;quot; .. z0 .. &amp;quot;, &amp;quot; .. x1 .. &amp;quot;, &amp;quot; .. y1 .. &amp;quot;, &amp;quot; .. z1 )&lt;br /&gt;
    else&lt;br /&gt;
        outputChatBox ( &amp;quot;Failed to retrieve bounding box&amp;quot; )&lt;br /&gt;
    end&lt;br /&gt;
end&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==See Also==&lt;br /&gt;
{{Client element functions}}&lt;/div&gt;</summary>
		<author><name>Crytx</name></author>
	</entry>
	<entry>
		<id>https://wiki.multitheftauto.com/index.php?title=SetPlayerMuted&amp;diff=55457</id>
		<title>SetPlayerMuted</title>
		<link rel="alternate" type="text/html" href="https://wiki.multitheftauto.com/index.php?title=SetPlayerMuted&amp;diff=55457"/>
		<updated>2018-06-24T03:57:13Z</updated>

		<summary type="html">&lt;p&gt;Crytx: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{note| Don't forget to give admin rights to the resource, in which you are using setPlayerMuted function or it won't work.}}&lt;br /&gt;
__NOTOC__&lt;br /&gt;
{{Server function}}&lt;br /&gt;
Use this function to mute or unmute the player.&lt;br /&gt;
&lt;br /&gt;
==Syntax==&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;bool setPlayerMuted ( player thePlayer, bool state )&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
{{OOP||[[player]]:setMuted|muted|isPlayerMuted}}&lt;br /&gt;
===Required Arguments===&lt;br /&gt;
*'''thePlayer:''' The [[player]] you are muting or unmuting.&lt;br /&gt;
*'''state:''' Use '''true''' to mute and '''false''' to unmute the player.&lt;br /&gt;
&lt;br /&gt;
===Returns===&lt;br /&gt;
Returns ''true'' if the player was successfully muted or unmuted, ''false'' otherwise.&lt;br /&gt;
&lt;br /&gt;
==Example==&lt;br /&gt;
This adds a /mute command that can be used to mute a player.&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;&lt;br /&gt;
-- create the function&lt;br /&gt;
function mutePlayer(player,command,victimName)&lt;br /&gt;
	-- if the player has specified a victim name to mute&lt;br /&gt;
	if victimName then&lt;br /&gt;
		-- get the victim player element from their name&lt;br /&gt;
		local victim = getPlayerFromName(victimName)&lt;br /&gt;
		-- if the player exists&lt;br /&gt;
		if victim then&lt;br /&gt;
			-- if they arent already muted&lt;br /&gt;
			if ( not isPlayerMuted(victim) ) then&lt;br /&gt;
				-- mute them and output a message to the chat&lt;br /&gt;
				setPlayerMuted(victim, true)&lt;br /&gt;
				outputChatBox(&amp;quot;You have been muted.&amp;quot;,victim)&lt;br /&gt;
			end&lt;br /&gt;
		else&lt;br /&gt;
			outputChatBox(&amp;quot;Could not find player with name: &amp;quot;..tostring(victimName),player)&lt;br /&gt;
		end&lt;br /&gt;
	else&lt;br /&gt;
		outputChatBox(&amp;quot;Usage: /mute &amp;lt;player name&amp;gt;&amp;quot;,player)&lt;br /&gt;
	end&lt;br /&gt;
end&lt;br /&gt;
-- add the /mute command&lt;br /&gt;
addCommandHandler(&amp;quot;mute&amp;quot;,mutePlayer)&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==See Also==&lt;br /&gt;
{{Player functions}}&lt;/div&gt;</summary>
		<author><name>Crytx</name></author>
	</entry>
	<entry>
		<id>https://wiki.multitheftauto.com/index.php?title=BanPlayer&amp;diff=55456</id>
		<title>BanPlayer</title>
		<link rel="alternate" type="text/html" href="https://wiki.multitheftauto.com/index.php?title=BanPlayer&amp;diff=55456"/>
		<updated>2018-06-24T03:54:26Z</updated>

		<summary type="html">&lt;p&gt;Crytx: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{note| Don't forget to give admin rights to the resource, in which you are using banPlayer function or it won't work.}}&lt;br /&gt;
__NOTOC__ &lt;br /&gt;
{{Server function}}&lt;br /&gt;
{{New feature|3|1.0|&lt;br /&gt;
This function will ban the specified player by either IP, [[serial]] or username&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{Deprecated_feature|3|1.0|&lt;br /&gt;
This function will ban the specified player from the server by IP.&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
==Syntax== &lt;br /&gt;
{{New feature|3|1.0|&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;&lt;br /&gt;
ban banPlayer ( player bannedPlayer, [ bool IP = true, bool Username = false, bool Serial = false, player/string responsiblePlayer = nil, string reason = nil, int seconds = 0 ] )&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{Deprecated_feature|3|1.0|&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;&lt;br /&gt;
bool banPlayer ( player bannedPlayer , [ element responsibleElement, string reason ] )         &lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
}}&lt;br /&gt;
{{OOP||[[player]]:ban||}}&lt;br /&gt;
===Required Arguments=== &lt;br /&gt;
*'''bannedPlayer:''' The player that will be banned from the server.&lt;br /&gt;
&lt;br /&gt;
===Optional Arguments=== &lt;br /&gt;
{{OptionalArg}} &lt;br /&gt;
{{New feature|3|1.0|&lt;br /&gt;
*'''IP:''' Will player be banned by IP?&lt;br /&gt;
*'''Username:''' Will player be banned by username?&lt;br /&gt;
*'''Serial:''' Will player be banned by serial?&lt;br /&gt;
}}&lt;br /&gt;
*'''responsibleElement:''' The element that is responsible for banning the player. This can be a player or the root ([[getRootElement]]()) (Maximum 30 characters if using a string).&lt;br /&gt;
*'''reason:''' The reason the player will be banned from the server.&lt;br /&gt;
*'''seconds:''' The amount of seconds the player will be banned from the server for. This can be 0 for an infinite amount of time.&lt;br /&gt;
&lt;br /&gt;
===Returns===&lt;br /&gt;
Returns a [[ban]] object if banned successfully, or ''false'' if unsuccessful.&lt;br /&gt;
&lt;br /&gt;
==Example==&lt;br /&gt;
This example lets a player ban anyone if he has ACL rights.&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;&lt;br /&gt;
--Add the &amp;quot;ban&amp;quot; command handler&lt;br /&gt;
-- Example with the player&lt;br /&gt;
function banPlayerCommand ( theClient, commandName, bannedName, reason )&lt;br /&gt;
&lt;br /&gt;
	-- Give the player a nice error if he doesn't have rights&lt;br /&gt;
	if ( hasObjectPermissionTo ( theClient, &amp;quot;function.banPlayer&amp;quot; ) ) then&lt;br /&gt;
		--Get player element from the name&lt;br /&gt;
		local bannedPlayer = getPlayerFromName ( bannedName )&lt;br /&gt;
&lt;br /&gt;
		--Ban the player&lt;br /&gt;
		banPlayer ( bannedPlayer, theClient, reason )&lt;br /&gt;
		outputChatBox ( &amp;quot;ban: &amp;quot; .. bannedName .. &amp;quot; successfully banned&amp;quot;, theClient )&lt;br /&gt;
&lt;br /&gt;
	else&lt;br /&gt;
		outputChatBox ( &amp;quot;ban: You don't have enough permissions&amp;quot;, theClient )&lt;br /&gt;
	end&lt;br /&gt;
&lt;br /&gt;
end&lt;br /&gt;
addCommandHandler ( &amp;quot;ban&amp;quot;, banPlayerCommand )&lt;br /&gt;
&lt;br /&gt;
-- Example function with the root element. Here you would pass a player element to the function.&lt;br /&gt;
function banCheater(theCheater)&lt;br /&gt;
	banPlayer(theCheater, getRootElement(), &amp;quot;You are banned because of cheating.&amp;quot;)&lt;br /&gt;
end&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
This example is Firewall Account Player by serial on Login&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;&lt;br /&gt;
Firewall = &lt;br /&gt;
{&lt;br /&gt;
    [ 'AccountName' ] = 'SerialPlayer',&lt;br /&gt;
    [ '3ash8' ] = '9C9F3B55D9D7BB7135FF274D3BF444E4',&lt;br /&gt;
    [ 'test5' ] = '1D6F76CF8D7193792D13789849498452',&lt;br /&gt;
}&lt;br /&gt;
 &lt;br /&gt;
addEventHandler ( 'onPlayerLogin', getRootElement ( ),&lt;br /&gt;
    function ( _, theCurrentAccount )&lt;br /&gt;
    local Serial = Firewall[getAccountName(theCurrentAccount)]&lt;br /&gt;
        if ( Serial ) then&lt;br /&gt;
            if Serial ~= getPlayerSerial ( source ) then&lt;br /&gt;
                banPlayer ( source, false, false, true, getRootElement ( ), 'reason ban' )&lt;br /&gt;
            end&lt;br /&gt;
        end&lt;br /&gt;
    end&lt;br /&gt;
)&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==See Also==&lt;br /&gt;
{{Admin_functions}}&lt;br /&gt;
[[es:banPlayer]]&lt;br /&gt;
[[ru:BanPlayer]]&lt;/div&gt;</summary>
		<author><name>Crytx</name></author>
	</entry>
	<entry>
		<id>https://wiki.multitheftauto.com/index.php?title=RestartResource&amp;diff=55455</id>
		<title>RestartResource</title>
		<link rel="alternate" type="text/html" href="https://wiki.multitheftauto.com/index.php?title=RestartResource&amp;diff=55455"/>
		<updated>2018-06-24T03:52:17Z</updated>

		<summary type="html">&lt;p&gt;Crytx: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{Server function}}&lt;br /&gt;
{{note| Don't forget to give admin rights to the resource, in which you are using restartResource function or it won't work.}}&lt;br /&gt;
__NOTOC__&lt;br /&gt;
This function restarts a running resource. Restarting will destroy all the elements that the resource has created (as stopping the resource does).&lt;br /&gt;
&lt;br /&gt;
'''Note:''' This function does not restart the resource immediately. Restarts are queued up until the end of the server's frame to ensure that they occur in the correct order (and that dependent resources can start and stop correctly). The resource being restarted will have an [[onResourceStop]] event triggered and the restarted instance will receive an [[onResourceStart]] event. Remember that the element and resource variables will be invalidated during the restart, though of course, the resource's name will not. &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 restartResource ( resource theResource [, bool persistent = false, bool configs = true, bool maps = true, bool scripts = true, bool html = true, bool clientConfigs = true, bool clientScripts = true, bool clientFiles = true ] )&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt; &lt;br /&gt;
{{OOP||[[resource]]:restart}}&lt;br /&gt;
===Required Arguments=== &lt;br /&gt;
*'''theResource:''' the [[resource]] you want to restart.&lt;br /&gt;
&lt;br /&gt;
===Optional Arguments===&lt;br /&gt;
*'''persistent:''' Unused&lt;br /&gt;
*'''configs:''' Reload configs?&lt;br /&gt;
*'''maps:''' Reload maps?&lt;br /&gt;
*'''scripts:''' Reload (server) scripts?&lt;br /&gt;
*'''html:''' Reload html files (for resource web access)?&lt;br /&gt;
*'''clientConfigs:''' Reload client configs?&lt;br /&gt;
*'''clientScripts:''' Reload client scripts?&lt;br /&gt;
*'''clientFiles:''' Reload files?&lt;br /&gt;
&lt;br /&gt;
===Returns===&lt;br /&gt;
Returns ''true'' if the resource was restarted, ''false'' if the resource wasn't running, or an invalid resource was passed.&lt;br /&gt;
&lt;br /&gt;
==Example== &lt;br /&gt;
Example 1: This function restarts all running resources.&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;&lt;br /&gt;
function restartAllResources()&lt;br /&gt;
	-- we store a table of resources&lt;br /&gt;
	local allResources = getResources()&lt;br /&gt;
	-- for each one of them,&lt;br /&gt;
	for index, res in ipairs(allResources) do&lt;br /&gt;
		-- if it's running,&lt;br /&gt;
		if getResourceState(res) == &amp;quot;running&amp;quot; then&lt;br /&gt;
			-- then restart it&lt;br /&gt;
			restartResource(res)&lt;br /&gt;
		end&lt;br /&gt;
	end&lt;br /&gt;
end&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Example 2: This example will restart the specify resource every 3600000 milliseconds (hour).&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;&lt;br /&gt;
setTimer(&lt;br /&gt;
    function()  &lt;br /&gt;
	--restarting this resource every hour&lt;br /&gt;
        restartResource(getThisResource())&lt;br /&gt;
    end,&lt;br /&gt;
3600000, 0)&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==See Also==&lt;br /&gt;
{{Resource_functions}}&lt;/div&gt;</summary>
		<author><name>Crytx</name></author>
	</entry>
	<entry>
		<id>https://wiki.multitheftauto.com/index.php?title=RestartResource&amp;diff=55454</id>
		<title>RestartResource</title>
		<link rel="alternate" type="text/html" href="https://wiki.multitheftauto.com/index.php?title=RestartResource&amp;diff=55454"/>
		<updated>2018-06-24T03:51:53Z</updated>

		<summary type="html">&lt;p&gt;Crytx: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{Server function}}&lt;br /&gt;
{{note| Don't forget to give admin rights to the resource, in which you are using RestartResource function or it won't work.}}&lt;br /&gt;
__NOTOC__&lt;br /&gt;
This function restarts a running resource. Restarting will destroy all the elements that the resource has created (as stopping the resource does).&lt;br /&gt;
&lt;br /&gt;
'''Note:''' This function does not restart the resource immediately. Restarts are queued up until the end of the server's frame to ensure that they occur in the correct order (and that dependent resources can start and stop correctly). The resource being restarted will have an [[onResourceStop]] event triggered and the restarted instance will receive an [[onResourceStart]] event. Remember that the element and resource variables will be invalidated during the restart, though of course, the resource's name will not. &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 restartResource ( resource theResource [, bool persistent = false, bool configs = true, bool maps = true, bool scripts = true, bool html = true, bool clientConfigs = true, bool clientScripts = true, bool clientFiles = true ] )&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt; &lt;br /&gt;
{{OOP||[[resource]]:restart}}&lt;br /&gt;
===Required Arguments=== &lt;br /&gt;
*'''theResource:''' the [[resource]] you want to restart.&lt;br /&gt;
&lt;br /&gt;
===Optional Arguments===&lt;br /&gt;
*'''persistent:''' Unused&lt;br /&gt;
*'''configs:''' Reload configs?&lt;br /&gt;
*'''maps:''' Reload maps?&lt;br /&gt;
*'''scripts:''' Reload (server) scripts?&lt;br /&gt;
*'''html:''' Reload html files (for resource web access)?&lt;br /&gt;
*'''clientConfigs:''' Reload client configs?&lt;br /&gt;
*'''clientScripts:''' Reload client scripts?&lt;br /&gt;
*'''clientFiles:''' Reload files?&lt;br /&gt;
&lt;br /&gt;
===Returns===&lt;br /&gt;
Returns ''true'' if the resource was restarted, ''false'' if the resource wasn't running, or an invalid resource was passed.&lt;br /&gt;
&lt;br /&gt;
==Example== &lt;br /&gt;
Example 1: This function restarts all running resources.&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;&lt;br /&gt;
function restartAllResources()&lt;br /&gt;
	-- we store a table of resources&lt;br /&gt;
	local allResources = getResources()&lt;br /&gt;
	-- for each one of them,&lt;br /&gt;
	for index, res in ipairs(allResources) do&lt;br /&gt;
		-- if it's running,&lt;br /&gt;
		if getResourceState(res) == &amp;quot;running&amp;quot; then&lt;br /&gt;
			-- then restart it&lt;br /&gt;
			restartResource(res)&lt;br /&gt;
		end&lt;br /&gt;
	end&lt;br /&gt;
end&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Example 2: This example will restart the specify resource every 3600000 milliseconds (hour).&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;&lt;br /&gt;
setTimer(&lt;br /&gt;
    function()  &lt;br /&gt;
	--restarting this resource every hour&lt;br /&gt;
        restartResource(getThisResource())&lt;br /&gt;
    end,&lt;br /&gt;
3600000, 0)&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==See Also==&lt;br /&gt;
{{Resource_functions}}&lt;/div&gt;</summary>
		<author><name>Crytx</name></author>
	</entry>
	<entry>
		<id>https://wiki.multitheftauto.com/index.php?title=SetElementAlpha&amp;diff=55451</id>
		<title>SetElementAlpha</title>
		<link rel="alternate" type="text/html" href="https://wiki.multitheftauto.com/index.php?title=SetElementAlpha&amp;diff=55451"/>
		<updated>2018-06-23T17:23:20Z</updated>

		<summary type="html">&lt;p&gt;Crytx: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{Server client function}}&lt;br /&gt;
__NOTOC__&lt;br /&gt;
This function sets the alpha (transparency) value for the specified [[element]]. This can be a [[player]], [[ped]], [[object]], [[vehicle]] or [[Element/Weapon|weapon]].&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 setElementAlpha ( element theElement, int alpha )&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
{{OOP||[[element]]:setAlpha|alpha|getElementAlpha}}&lt;br /&gt;
&lt;br /&gt;
===Required Arguments===&lt;br /&gt;
*'''theElement:''' The [[element]] whose alpha you want to set.&lt;br /&gt;
*'''alpha:'''  The alpha value to set. Values are 0-255, where 255 is fully opaque and 0 is fully transparent.&lt;br /&gt;
** '''Note:''' [[Object]]s are fully transparent at 140. &lt;br /&gt;
===Returns===&lt;br /&gt;
Returns ''true'' or ''false'' if invalid arguments were passed.&lt;br /&gt;
&lt;br /&gt;
[[file:MTAsa_alpha01.png|400px|thumb|left|Player's Normal Transparency]][[file:MTAsa_alpha02.png|400px|thumb|left|Player's Transparency On Alpha Level 100]][[file:MTAsa_alpha03.png|400px|thumb|left|Player's Transparency On Alpha Level 0]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==Example==&lt;br /&gt;
&amp;lt;section name=&amp;quot;Clientside example&amp;quot; class=&amp;quot;client&amp;quot; show=&amp;quot;true&amp;quot;&amp;gt;&lt;br /&gt;
This example makes the player invisible.&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;&lt;br /&gt;
function invisible()&lt;br /&gt;
        setElementAlpha(localPlayer, 0)&lt;br /&gt;
end&lt;br /&gt;
addCommandHandler ( &amp;quot;invisible&amp;quot;, invisible )&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&amp;lt;/section&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;section name=&amp;quot;Serverside example&amp;quot; class=&amp;quot;server&amp;quot; show=&amp;quot;true&amp;quot;&amp;gt;&lt;br /&gt;
This example lets you toggle invisibility when you write /invis.&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;&lt;br /&gt;
function toggleInvis ( thePlayer )  -- thePlayer is whoever executed the command&lt;br /&gt;
   if getElementAlpha( thePlayer ) == 0 then -- if the player is invisible&lt;br /&gt;
       setElementAlpha ( thePlayer, 255 ) -- set the player alpha to 255.&lt;br /&gt;
   else	-- else, if the player is visible&lt;br /&gt;
       setElementAlpha ( thePlayer, 0 )	-- set the players alpha to 0.&lt;br /&gt;
   end&lt;br /&gt;
end&lt;br /&gt;
addCommandHandler ( &amp;quot;invis&amp;quot;, toggleInvis ) -- When /invis is typed, the function 'toggleInvis' will start.&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;
{{Element functions}}&lt;/div&gt;</summary>
		<author><name>Crytx</name></author>
	</entry>
	<entry>
		<id>https://wiki.multitheftauto.com/index.php?title=DxDrawImage&amp;diff=55442</id>
		<title>DxDrawImage</title>
		<link rel="alternate" type="text/html" href="https://wiki.multitheftauto.com/index.php?title=DxDrawImage&amp;diff=55442"/>
		<updated>2018-06-23T16:12:48Z</updated>

		<summary type="html">&lt;p&gt;Crytx: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;__NOTOC__ &lt;br /&gt;
{{Client function}} &lt;br /&gt;
&lt;br /&gt;
Draws an image on the screen for a single frame. In order for the image to stay visible continuously, you need to call this function with the same parameters on each frame update (see [[onClientRender]]).&amp;lt;br/&amp;gt;&lt;br /&gt;
Image files should ideally have dimensions that are a power of two, to prevent possible blurring.&amp;lt;br/&amp;gt;&lt;br /&gt;
&amp;lt;b&amp;gt;Power of two: 2px, 4px, 8px, 16px, 32px, 64px, 128px, 256px, 512px, 1024px...&amp;lt;/b&amp;gt;&lt;br /&gt;
&lt;br /&gt;
{{Tip|Use a texture created with [[dxCreateTexture]] to '''speed up drawing'''.}}&lt;br /&gt;
{{Tip|To help prevent edge artifacts when drawing textures, set '''textureEdge''' to '''&amp;quot;clamp&amp;quot;''' when calling [[dxCreateTexture]]}}&lt;br /&gt;
==Syntax==&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;&lt;br /&gt;
bool dxDrawImage ( float posX, float posY, float width, float height, mixed image,&lt;br /&gt;
                 [ float rotation = 0, float rotationCenterOffsetX = 0, float rotationCenterOffsetY = 0,&lt;br /&gt;
                   int color = tocolor(255,255,255,255), bool postGUI = false ] )&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Required Arguments=== &lt;br /&gt;
*'''posX:''' the absolute X coordinate of the top left corner of the image&lt;br /&gt;
*'''posY:''' the absolute Y coordinate of the top left corner of the image&lt;br /&gt;
*'''width:''' the absolute width of the image&lt;br /&gt;
*'''height:''' the absolute height of the image&lt;br /&gt;
*'''image:''' Either a [[material]] element or a [[filepath]] of the image which is going to be drawn. (.dds images are also supported). Image files should ideally have dimensions that are a power of two, to prevent possible blurring. Use a texture created with [[dxCreateTexture]] to '''speed up drawing'''.&lt;br /&gt;
&lt;br /&gt;
===Optional Arguments===&lt;br /&gt;
*'''rotation:''' the rotation, in degrees for the image.&lt;br /&gt;
*'''rotationCenterOffsetX:''' the absolute X offset from the image center for which to rotate the image from.&lt;br /&gt;
*'''rotationCenterOffsetY:''' the absolute Y offset from the image center for which to rotate the image from.&lt;br /&gt;
*'''color:''' Tints the image with a value produced by [[tocolor]] or hexadecimal number in format: 0xAARRGGBB (RR = red, GG = green, BB = blue, AA = alpha).&lt;br /&gt;
*'''postGUI:''' A bool representing whether the image should be drawn on top of or behind any ingame GUI (rendered by CEGUI).&lt;br /&gt;
&lt;br /&gt;
===Returns===&lt;br /&gt;
Returns ''true'' if successful, ''false'' otherwise.&lt;br /&gt;
&lt;br /&gt;
[[File:MTAsa dxDrawImage.png|400px|thumb|left|Image Drew By &amp;quot;dxDrawImage&amp;quot; Function]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==Example== &lt;br /&gt;
Example of a pendulum swinging from the top of the screen, made using dxDrawImage.&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;&lt;br /&gt;
local screenWidth,screenHeight = guiGetScreenSize()  -- Get screen resolution.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
function renderDisplay ( )&lt;br /&gt;
	local seconds = getTickCount() / 1000&lt;br /&gt;
	local angle = math.sin(seconds) * 80&lt;br /&gt;
	-- This will draw the graphic file 'arrow.png' at the top middle of the screen&lt;br /&gt;
	-- using the size of 100 pixels wide, and 240 pixels high.&lt;br /&gt;
	-- The center of rotation is at the top of the image.&lt;br /&gt;
	dxDrawImage ( screenWidth/2 - 50, 0, 100, 240, 'arrow.png', angle, 0, -120 )&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
function HandleTheRendering ( )&lt;br /&gt;
	addEventHandler(&amp;quot;onClientRender&amp;quot;, root, renderDisplay)  -- Keep everything visible with onClientRender.&lt;br /&gt;
end&lt;br /&gt;
addEventHandler(&amp;quot;onClientResourceStart&amp;quot;,resourceRoot, HandleTheRendering)&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==See Also==&lt;br /&gt;
{{Drawing_functions}}&lt;/div&gt;</summary>
		<author><name>Crytx</name></author>
	</entry>
	<entry>
		<id>https://wiki.multitheftauto.com/index.php?title=File:MTAsa_dxDrawImage.png&amp;diff=55441</id>
		<title>File:MTAsa dxDrawImage.png</title>
		<link rel="alternate" type="text/html" href="https://wiki.multitheftauto.com/index.php?title=File:MTAsa_dxDrawImage.png&amp;diff=55441"/>
		<updated>2018-06-23T16:08:03Z</updated>

		<summary type="html">&lt;p&gt;Crytx: An Image Drew Using &amp;quot;dxDrawImage&amp;quot; function.&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;An Image Drew Using &amp;quot;dxDrawImage&amp;quot; function.&lt;/div&gt;</summary>
		<author><name>Crytx</name></author>
	</entry>
	<entry>
		<id>https://wiki.multitheftauto.com/index.php?title=IsPlayerMapVisible&amp;diff=55440</id>
		<title>IsPlayerMapVisible</title>
		<link rel="alternate" type="text/html" href="https://wiki.multitheftauto.com/index.php?title=IsPlayerMapVisible&amp;diff=55440"/>
		<updated>2018-06-23T15:06:10Z</updated>

		<summary type="html">&lt;p&gt;Crytx: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;__NOTOC__&lt;br /&gt;
{{Client function}}&lt;br /&gt;
This function checks if the local player has their map showing&lt;br /&gt;
&lt;br /&gt;
==Syntax==&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;bool isPlayerMapVisible ()&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Returns===&lt;br /&gt;
Returns ''true'' if the player has the map visible, ''false'' otherwise.&lt;br /&gt;
&lt;br /&gt;
[[File:MTAsa_Default_Map.png|400px|thumb|left|MTA:SA Default Map]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==Example==&lt;br /&gt;
&amp;lt;section name=&amp;quot;Example 1&amp;quot; class=&amp;quot;client&amp;quot; show=&amp;quot;true&amp;quot;&amp;gt;&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;&lt;br /&gt;
function checkMap()&lt;br /&gt;
   local text = (isPlayerMapVisible() and &amp;quot;You are currently viewing your map!&amp;quot;) or &amp;quot;Your map is not visible!&amp;quot;&lt;br /&gt;
   outputChatBox(text, 255, 255, 0) -- output text &lt;br /&gt;
end&lt;br /&gt;
addCommandHandler(&amp;quot;map&amp;quot;, checkMap) -- add '/map' command to the check&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&amp;lt;/section&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;section name=&amp;quot;Example 2&amp;quot; class=&amp;quot;client&amp;quot; show=&amp;quot;true&amp;quot;&amp;gt;&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;&lt;br /&gt;
function showMap()&lt;br /&gt;
   if isPlayerMapVisible() then&lt;br /&gt;
      outputChatBox(&amp;quot;Radar closed&amp;quot;, 0, 255, 0)&lt;br /&gt;
      forcePlayerMap(false)&lt;br /&gt;
   else&lt;br /&gt;
      outputChatBox(&amp;quot;Viewing radar&amp;quot;, 0, 255, 0)&lt;br /&gt;
      forcePlayerMap(true)&lt;br /&gt;
   end&lt;br /&gt;
end&lt;br /&gt;
addCommandHandler(&amp;quot;showmap&amp;quot;, showMap)&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&amp;lt;/section&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==See Also==&lt;br /&gt;
{{Client player functions}}&lt;/div&gt;</summary>
		<author><name>Crytx</name></author>
	</entry>
	<entry>
		<id>https://wiki.multitheftauto.com/index.php?title=File:MTAsa_Default_Map.png&amp;diff=55439</id>
		<title>File:MTAsa Default Map.png</title>
		<link rel="alternate" type="text/html" href="https://wiki.multitheftauto.com/index.php?title=File:MTAsa_Default_Map.png&amp;diff=55439"/>
		<updated>2018-06-23T14:58:02Z</updated>

		<summary type="html">&lt;p&gt;Crytx: MTA:SA Default Map&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;MTA:SA Default Map&lt;/div&gt;</summary>
		<author><name>Crytx</name></author>
	</entry>
	<entry>
		<id>https://wiki.multitheftauto.com/index.php?title=CreateMarker&amp;diff=55438</id>
		<title>CreateMarker</title>
		<link rel="alternate" type="text/html" href="https://wiki.multitheftauto.com/index.php?title=CreateMarker&amp;diff=55438"/>
		<updated>2018-06-23T14:31:40Z</updated>

		<summary type="html">&lt;p&gt;Crytx: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;__NOTOC__&lt;br /&gt;
{{Server client function}}&lt;br /&gt;
This function creates a marker. A marker is a 3D model in the world that can highlight a particular point or area, often used to instruct players where to go to perform actions such as entering buildings.&lt;br /&gt;
&lt;br /&gt;
There are various limits that govern the maximum number of each type that can be visible at once. These are:&lt;br /&gt;
* Coronas: 32&lt;br /&gt;
* Checkpoints, Rings, Cylinders and Arrows combined: 32&lt;br /&gt;
&lt;br /&gt;
You are able to create as many markers as you wish (memory and element limit permitting), but the player will only be able to see the nearest ones up to the limit.&lt;br /&gt;
&lt;br /&gt;
==Syntax==&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;
marker createMarker ( float x, float y, float z [, string theType = &amp;quot;checkpoint&amp;quot;, float size = 4.0, int r = 0, int g = 0, int b = 255, int a = 255, visibleTo = getRootElement( ) ] )&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
{{OOP||Marker}}&lt;br /&gt;
===Required Arguments===&lt;br /&gt;
* '''x''': A floating point number representing the X coordinate on the map.&lt;br /&gt;
* '''y''': A floating point number representing the Y coordinate on the map.&lt;br /&gt;
* '''z''': A floating point number representing the Z coordinate on the map.&lt;br /&gt;
&lt;br /&gt;
===Optional arguments===&lt;br /&gt;
{{OptionalArg}}&lt;br /&gt;
* '''theType''': The visual type of the marker to be created. Possible values:&lt;br /&gt;
{{Marker_types}}&lt;br /&gt;
* '''size''': The diameter of the marker to be created, in meters.&lt;br /&gt;
* '''r''': An integer number representing the amount of red to use in the colouring of the marker (0 - 255).&lt;br /&gt;
* '''g''': An integer number representing the amount of green to use in the colouring of the marker (0 - 255).&lt;br /&gt;
* '''b''': An integer number representing the amount of blue to use in the colouring of the marker (0 - 255).&lt;br /&gt;
* '''a''': An integer number representing the amount of alpha to use in the colouring of the marker (0 - 255 where 0 is transparent and 255 is opaque).&lt;br /&gt;
* '''visibleTo''': This defines which elements can see the marker. Defaults to visible to everyone. See [[visibility]].&lt;br /&gt;
&amp;lt;/section&amp;gt;&lt;br /&gt;
&amp;lt;section name=&amp;quot;Client&amp;quot; class=&amp;quot;client&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;
marker createMarker ( float x, float y, float z [, string theType = &amp;quot;checkpoint&amp;quot;, float size = 4.0, int r = 0, int g = 0, int b = 255, int a = 255 ] )&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
{{OOP||Marker}}&lt;br /&gt;
===Required Arguments===&lt;br /&gt;
* '''x''': A floating point number representing the X coordinate on the map.&lt;br /&gt;
* '''y''': A floating point number representing the Y coordinate on the map.&lt;br /&gt;
* '''z''': A floating point number representing the Z coordinate on the map.&lt;br /&gt;
&lt;br /&gt;
===Optional arguments===&lt;br /&gt;
{{OptionalArg}}&lt;br /&gt;
* '''theType''': The visual type of the marker to be created. Possible values:&lt;br /&gt;
{{Marker_types}}&lt;br /&gt;
* '''size''': The diameter of the marker to be created, in meters.&lt;br /&gt;
* '''r''': An integer number representing the amount of red to use in the colouring of the marker (0 - 255).&lt;br /&gt;
* '''g''': An integer number representing the amount of green to use in the colouring of the marker (0 - 255).&lt;br /&gt;
* '''b''': An integer number representing the amount of blue to use in the colouring of the marker (0 - 255).&lt;br /&gt;
* '''a''': An integer number representing the amount of alpha to use in the colouring of the marker (0 - 255 where 0 is transparent and 255 is opaque).&lt;br /&gt;
&amp;lt;/section&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Returns===&lt;br /&gt;
Returns the [[marker]] element that was created, or ''false'' if the arguments are incorrect.&lt;br /&gt;
&lt;br /&gt;
==Example==&lt;br /&gt;
&amp;lt;section name=&amp;quot;Example 1&amp;quot; class=&amp;quot;server&amp;quot; show=&amp;quot;true&amp;quot;&amp;gt;&lt;br /&gt;
This example creates a marker next to the player when they type 'createmarker':&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;&lt;br /&gt;
-- this function is called whenever someone types 'createmarker' in the console:&lt;br /&gt;
function consoleCreateMarker ( thePlayer, commandName )&lt;br /&gt;
   if ( thePlayer ) then&lt;br /&gt;
      local x, y, z = getElementPosition ( thePlayer ) -- get the player's position&lt;br /&gt;
      -- create a cylindrical marker next to the player:&lt;br /&gt;
      local theMarker = createMarker ( x + 2, y + 2, z, &amp;quot;cylinder&amp;quot;, 1.5, 255, 255, 0, 170 )&lt;br /&gt;
      if ( theMarker ) then -- check if the marker was created successfully&lt;br /&gt;
         outputConsole ( &amp;quot;Marker created successfully&amp;quot;, thePlayer )&lt;br /&gt;
      else&lt;br /&gt;
         outputConsole ( &amp;quot;Failed to create marker&amp;quot;, thePlayer )&lt;br /&gt;
      end&lt;br /&gt;
   end&lt;br /&gt;
end&lt;br /&gt;
addCommandHandler ( &amp;quot;createmarker&amp;quot;, consoleCreateMarker )&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&amp;lt;/section&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Markers types ==&lt;br /&gt;
[[File:Mtasa_markers.png]]&lt;br /&gt;
&lt;br /&gt;
==See Also==&lt;br /&gt;
{{Marker functions}}&lt;br /&gt;
[[ru:createMarker]]&lt;br /&gt;
[[ar:createMarker]]&lt;br /&gt;
[[pl:createMarker]]&lt;/div&gt;</summary>
		<author><name>Crytx</name></author>
	</entry>
	<entry>
		<id>https://wiki.multitheftauto.com/index.php?title=File:Mtasa_markers.png&amp;diff=55437</id>
		<title>File:Mtasa markers.png</title>
		<link rel="alternate" type="text/html" href="https://wiki.multitheftauto.com/index.php?title=File:Mtasa_markers.png&amp;diff=55437"/>
		<updated>2018-06-23T14:29:45Z</updated>

		<summary type="html">&lt;p&gt;Crytx: Marker Types In MTA:SA&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Marker Types In MTA:SA&lt;/div&gt;</summary>
		<author><name>Crytx</name></author>
	</entry>
	<entry>
		<id>https://wiki.multitheftauto.com/index.php?title=GetCameraMatrix&amp;diff=55436</id>
		<title>GetCameraMatrix</title>
		<link rel="alternate" type="text/html" href="https://wiki.multitheftauto.com/index.php?title=GetCameraMatrix&amp;diff=55436"/>
		<updated>2018-06-23T12:53:53Z</updated>

		<summary type="html">&lt;p&gt;Crytx: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;__NOTOC__&lt;br /&gt;
{{Server client function}}&lt;br /&gt;
This function gets the position of the camera and the position of the point it is facing.&lt;br /&gt;
&lt;br /&gt;
Note: The server-side version of this function returns the last camera matrix that was set by the server, and thus does not necessarily indicate the current matrix of the camera (since it may have been changed client-side).&lt;br /&gt;
&lt;br /&gt;
==Syntax==&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;
float float float float float float float float getCameraMatrix (player thePlayer)&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
{{OOP||[[player]]:getCameraMatrix|cameraMatrix|setCameraMatrix}}&lt;br /&gt;
&lt;br /&gt;
===Required Arguments===&lt;br /&gt;
*'''thePlayer:''' The player whose camera matrix is to be returned.&lt;br /&gt;
&amp;lt;/section&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;section name=&amp;quot;Client&amp;quot; class=&amp;quot;client&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;
float float float float float float float float getCameraMatrix ()&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
{{OOP||[[Camera]].getMatrix|matrix|setCameraMatrix}}&lt;br /&gt;
&amp;lt;/section&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Returns===&lt;br /&gt;
This function returns 8 [[float|floats]] if the argument is valid (when applicable); the first three indicate the position of the camera, the next three indicate the position of the point it's facing, and the last two are the roll and field of view. Returns ''false'' if the argument is invalid.&lt;br /&gt;
&lt;br /&gt;
===Example===&lt;br /&gt;
&amp;lt;section name=&amp;quot;Client&amp;quot; class=&amp;quot;client&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;
local x, y, z, lx, ly, lz = getCameraMatrix ()&lt;br /&gt;
x, lx = x + 1, lx + 1&lt;br /&gt;
&lt;br /&gt;
setCameraMatrix (x, y, z, lx, ly, lz)&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;
{{Camera functions}}&lt;/div&gt;</summary>
		<author><name>Crytx</name></author>
	</entry>
	<entry>
		<id>https://wiki.multitheftauto.com/index.php?title=File:Enter_vehicle_task.png&amp;diff=55172</id>
		<title>File:Enter vehicle task.png</title>
		<link rel="alternate" type="text/html" href="https://wiki.multitheftauto.com/index.php?title=File:Enter_vehicle_task.png&amp;diff=55172"/>
		<updated>2018-06-02T07:40:56Z</updated>

		<summary type="html">&lt;p&gt;Crytx: Name Of The Ped's Task When press enter near a vehicle&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Name Of The Ped's Task When press enter near a vehicle&lt;/div&gt;</summary>
		<author><name>Crytx</name></author>
	</entry>
	<entry>
		<id>https://wiki.multitheftauto.com/index.php?title=OnClientBrowserWhitelistChange&amp;diff=55102</id>
		<title>OnClientBrowserWhitelistChange</title>
		<link rel="alternate" type="text/html" href="https://wiki.multitheftauto.com/index.php?title=OnClientBrowserWhitelistChange&amp;diff=55102"/>
		<updated>2018-05-23T16:55:27Z</updated>

		<summary type="html">&lt;p&gt;Crytx: /* Example */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;__NOTOC__&lt;br /&gt;
{{Client event}}&lt;br /&gt;
{{Needs Example}}&lt;br /&gt;
{{New feature/item|3.0150|1.5||&lt;br /&gt;
The event is triggered when the whitelist has changed. Note that this event is only triggered if the request window was confirmed by accepting.&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
==Parameters== &lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;&lt;br /&gt;
table changedDomains&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
*'''changedDomains:''' a [[table]] of changed domains.&lt;br /&gt;
&lt;br /&gt;
==Source==&lt;br /&gt;
The [[Element/Browser|browser]] element.&lt;br /&gt;
&lt;br /&gt;
==Example== &lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;&lt;br /&gt;
requestBrowserDomains({ &amp;quot;mtasa.com&amp;quot; }) -- request browser domain&lt;br /&gt;
showCursor(true) -- show cursor&lt;br /&gt;
addEventHandler(&amp;quot;onClientBrowserWhitelistChange&amp;quot;, root,&lt;br /&gt;
   function(newDomains)&lt;br /&gt;
     if newDomains[1] == &amp;quot;mtasa.com&amp;quot; then&lt;br /&gt;
       local browser = createBrowser(1280, 720, false, false) -- create browser&lt;br /&gt;
       loadBrowserURL(browser, &amp;quot;http://mtasa.com/&amp;quot;) -- load browser url&lt;br /&gt;
   end&lt;br /&gt;
end&lt;br /&gt;
)&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[[pl:onClientBrowserWhitelistChange]]&lt;br /&gt;
&lt;br /&gt;
==See Also==&lt;br /&gt;
{{CEF_events}}&lt;/div&gt;</summary>
		<author><name>Crytx</name></author>
	</entry>
</feed>