<?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=Krushofficial</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=Krushofficial"/>
	<link rel="alternate" type="text/html" href="https://wiki.multitheftauto.com/wiki/Special:Contributions/Krushofficial"/>
	<updated>2026-04-06T08:37:06Z</updated>
	<subtitle>User contributions</subtitle>
	<generator>MediaWiki 1.39.3</generator>
	<entry>
		<id>https://wiki.multitheftauto.com/index.php?title=Get&amp;diff=62340</id>
		<title>Get</title>
		<link rel="alternate" type="text/html" href="https://wiki.multitheftauto.com/index.php?title=Get&amp;diff=62340"/>
		<updated>2019-03-09T13:33:15Z</updated>

		<summary type="html">&lt;p&gt;Krushofficial: /* Optional Arguments */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{Server function}}&lt;br /&gt;
__NOTOC__&lt;br /&gt;
This function gets a setting's value, or a group of settings' values, from the [[settings system|settings registry]].&lt;br /&gt;
&lt;br /&gt;
''Note: Your settings cannot have a period (.) in them. This character is reserved. Read below for more details.''&lt;br /&gt;
&lt;br /&gt;
==Syntax== &lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;&lt;br /&gt;
var get ( string settingName )&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt; &lt;br /&gt;
&lt;br /&gt;
==Optional Arguments==&lt;br /&gt;
'''settingName:''' The name of the setting you want to get. See [[settings system#Setting names|setting names]] for information on settings names.&lt;br /&gt;
&lt;br /&gt;
===Returns===&lt;br /&gt;
Returns the value of the setting if a single setting was specified and found, or a ''table'' (in associative-array form) containing:&lt;br /&gt;
*the list of global setting name/value pairs if &amp;quot;.&amp;quot; is passed as a setting name,&lt;br /&gt;
*the list of resource settings if a resource name followed by a &amp;quot;.&amp;quot; is passed,&lt;br /&gt;
*the list of the script's resource settings if an empty string is passed.&lt;br /&gt;
It returns ''false'' if the specified setting or settings group doesn't exist, or if the settings group you are trying to retrieve doesn't have any public or protected settings.&lt;br /&gt;
&lt;br /&gt;
==Example==&lt;br /&gt;
Example returns a value from the settings registry with the name &amp;quot;respawnTime&amp;quot;.&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;&lt;br /&gt;
function getMySetting()&lt;br /&gt;
    if get ( &amp;quot;respawnTime&amp;quot; ) then&lt;br /&gt;
        return get ( &amp;quot;respawnTime&amp;quot; )&lt;br /&gt;
    end&lt;br /&gt;
    return false&lt;br /&gt;
end&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
Or easier:&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;&lt;br /&gt;
getMySetting = function() get(&amp;quot;respawnTime&amp;quot;) end&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==See Also==&lt;br /&gt;
{{Settings registry functions}}&lt;br /&gt;
&lt;br /&gt;
[[ru:get]]&lt;/div&gt;</summary>
		<author><name>Krushofficial</name></author>
	</entry>
	<entry>
		<id>https://wiki.multitheftauto.com/index.php?title=SetGameType&amp;diff=60137</id>
		<title>SetGameType</title>
		<link rel="alternate" type="text/html" href="https://wiki.multitheftauto.com/index.php?title=SetGameType&amp;diff=60137"/>
		<updated>2018-10-26T17:43:45Z</updated>

		<summary type="html">&lt;p&gt;Krushofficial: /* Example 2 */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;__NOTOC__&lt;br /&gt;
{{Server function}}&lt;br /&gt;
This function sets a string containing a name for the game type. This should be the game-mode that is active, for example &amp;quot;Capture The Flag&amp;quot; or &amp;quot;Deathmatch&amp;quot;. This is then displayed in the server browser and external server browsers.&lt;br /&gt;
&lt;br /&gt;
'''It should be noted that [[mapmanager]] handles this automatically for gamemodes that utilise the map/gamemode system.'''&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 setGameType ( string gameType )&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt; &lt;br /&gt;
&lt;br /&gt;
===Required Arguments=== &lt;br /&gt;
*'''gameType:''' A string containing a name for the game mode, or ''false'' to clear it.&lt;br /&gt;
&lt;br /&gt;
===Returns===&lt;br /&gt;
Returns ''true'' if the game type was set, ''false'' if an invalid argument was passed to the function.&lt;br /&gt;
&lt;br /&gt;
==Example== &lt;br /&gt;
This example sets the game type to ''Capture The Flag''.&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;&lt;br /&gt;
setGameType ( &amp;quot;Capture The Flag&amp;quot; )&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Example 2== &lt;br /&gt;
This example adds a command to change the game type.&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;&lt;br /&gt;
function setNewGameType( source, commandName, newGameType )&lt;br /&gt;
    local oldGameType = getGameType() -- check old Game Type&lt;br /&gt;
    setGameType( newGameType ) -- set new Game Type&lt;br /&gt;
    outputChatBox( &amp;quot;Game Type &amp;quot; .. oldGameType .. &amp;quot; changed to &amp;quot; .. newGameType .. &amp;quot;.&amp;quot;, getRootElement(), 255, 128, 0 )&lt;br /&gt;
end&lt;br /&gt;
addCommandHandler( &amp;quot;setgametype&amp;quot;, setNewGameType )&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==See Also==&lt;br /&gt;
{{Announce functions}}&lt;/div&gt;</summary>
		<author><name>Krushofficial</name></author>
	</entry>
	<entry>
		<id>https://wiki.multitheftauto.com/index.php?title=SetMapName&amp;diff=60136</id>
		<title>SetMapName</title>
		<link rel="alternate" type="text/html" href="https://wiki.multitheftauto.com/index.php?title=SetMapName&amp;diff=60136"/>
		<updated>2018-10-26T17:42:50Z</updated>

		<summary type="html">&lt;p&gt;Krushofficial: /* Example */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;__NOTOC__&lt;br /&gt;
{{Server function}}&lt;br /&gt;
This function is used to set a map name that will be visible in the server browser. In practice you should generally rely on the mapmanager to do this for you.&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 setMapName ( string mapName )&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt; &lt;br /&gt;
&lt;br /&gt;
===Required Arguments=== &lt;br /&gt;
*'''mapName:''' The name you wish the server browser to show.&lt;br /&gt;
&lt;br /&gt;
===Returns===&lt;br /&gt;
Returns ''true'' if map name was set successfully, ''false'' otherwise.&lt;br /&gt;
&lt;br /&gt;
==Example== &lt;br /&gt;
This example sets the map name to ''My amazing map!''. &lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;&lt;br /&gt;
setMapName(&amp;quot;My amazing map!&amp;quot;)&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==See Also==&lt;br /&gt;
{{Announce functions}}&lt;/div&gt;</summary>
		<author><name>Krushofficial</name></author>
	</entry>
	<entry>
		<id>https://wiki.multitheftauto.com/index.php?title=SetMapName&amp;diff=60135</id>
		<title>SetMapName</title>
		<link rel="alternate" type="text/html" href="https://wiki.multitheftauto.com/index.php?title=SetMapName&amp;diff=60135"/>
		<updated>2018-10-26T17:42:25Z</updated>

		<summary type="html">&lt;p&gt;Krushofficial: /* Example */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;__NOTOC__&lt;br /&gt;
{{Server function}}&lt;br /&gt;
This function is used to set a map name that will be visible in the server browser. In practice you should generally rely on the mapmanager to do this for you.&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 setMapName ( string mapName )&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt; &lt;br /&gt;
&lt;br /&gt;
===Required Arguments=== &lt;br /&gt;
*'''mapName:''' The name you wish the server browser to show.&lt;br /&gt;
&lt;br /&gt;
===Returns===&lt;br /&gt;
Returns ''true'' if map name was set successfully, ''false'' otherwise.&lt;br /&gt;
&lt;br /&gt;
==Example== &lt;br /&gt;
This example sets the map name to ''My amazing map!'' when the resource is started. &lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;&lt;br /&gt;
setMapName(&amp;quot;My amazing map!&amp;quot;)&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==See Also==&lt;br /&gt;
{{Announce functions}}&lt;/div&gt;</summary>
		<author><name>Krushofficial</name></author>
	</entry>
	<entry>
		<id>https://wiki.multitheftauto.com/index.php?title=InterpolateBetween&amp;diff=55846</id>
		<title>InterpolateBetween</title>
		<link rel="alternate" type="text/html" href="https://wiki.multitheftauto.com/index.php?title=InterpolateBetween&amp;diff=55846"/>
		<updated>2018-07-14T21:22:05Z</updated>

		<summary type="html">&lt;p&gt;Krushofficial: /* Required Arguments */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;__NOTOC__&lt;br /&gt;
{{Server client function}}&lt;br /&gt;
&lt;br /&gt;
Interpolates a 3D Vector between a source value and a target value using either linear interpolation or any other [[Easing|easing function]].&lt;br /&gt;
It can also be used to interpolate 2D vectors or scalars by only setting some of the x, y, z values and putting 0 to the others.&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 interpolateBetween ( float x1, float y1, float z1, float x2, float y2, float z2, float fProgress, string strEasingType, [ float fEasingPeriod, float fEasingAmplitude, float fEasingOvershoot ] )&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Required Arguments===&lt;br /&gt;
*'''x1, y1, z1:''' 3D coordinates of source vector/value&lt;br /&gt;
*'''x2, y2, z2:''' 3D coordinates of target vector/value&lt;br /&gt;
*'''fProgress:''' float between 0 and 1 indicating the interpolation progress (0 at the beginning of the interpolation, 1 at the end). If it is higher than 1, it will start from the beginning.&lt;br /&gt;
*'''strEasingType:''' the [[Easing|easing function]] to use for the interpolation&lt;br /&gt;
&lt;br /&gt;
===Optional Arguments===&lt;br /&gt;
*'''fEasingPeriod:''' the period of the [[Easing|easing function]] (only some easing functions use this parameter)&lt;br /&gt;
*'''fEasingAmplitude:''' the amplitude of the [[Easing|easing function]] (only some easing functions use this parameter)&lt;br /&gt;
*'''fEasingOvershoot:''' the overshoot of the [[Easing|easing function]] (only some easing functions use this parameter)&lt;br /&gt;
&lt;br /&gt;
===Returns===&lt;br /&gt;
Returns ''x, y, z'' the interpolated 3D vector/value if successful, ''false'' otherwise (error in parameters).&lt;br /&gt;
As mentioned before, interpolateBetween can be used on 2D vectors or scalars in which case only some (x, y or just x) of the returned values are to be used (cf. alpha interpolation in marker example or size interpolation in window example).&lt;br /&gt;
&lt;br /&gt;
== Examples ==&lt;br /&gt;
The examples below are only clientside examples even though the function can be used on both sides. Indeed it makes more sense to use it with onClientRender/onClientPreRender but the freedom is given to use it in any other context.&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;
This clientside example uses interpolateBetween to create position and color interpolation(with effect) on a marker.&lt;br /&gt;
The command to test it is &amp;quot;/marker&amp;quot;.&lt;br /&gt;
The position is interpolated with &amp;quot;OutBounce&amp;quot; as strEasingType to make the marker bounce off the ground and &amp;quot;Linear&amp;quot; interpolation for the color.&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;&lt;br /&gt;
local g_Marker = nil&lt;br /&gt;
addCommandHandler(&amp;quot;marker&amp;quot;,&lt;br /&gt;
function ()&lt;br /&gt;
	if g_Marker then return end&lt;br /&gt;
	&lt;br /&gt;
	local x, y, z = getElementPosition(getLocalPlayer())&lt;br /&gt;
	z = z - 1&lt;br /&gt;
	&lt;br /&gt;
	g_Marker = {}&lt;br /&gt;
	g_Marker.startPos = {x, y, z + 5}&lt;br /&gt;
	g_Marker.startTime = getTickCount()&lt;br /&gt;
	g_Marker.startColor = {255, 0, 0, 0}&lt;br /&gt;
	g_Marker.endPos = {x, y, z}&lt;br /&gt;
	g_Marker.endTime = g_Marker.startTime + 2000&lt;br /&gt;
	g_Marker.endColor = {0, 0, 255, 255}	&lt;br /&gt;
	&lt;br /&gt;
	local x, y, z = unpack(g_Marker.startPos)&lt;br /&gt;
	local r, g, b, a = unpack(g_Marker.startColor)&lt;br /&gt;
	g_Marker.marker = createMarker(x, y, z, &amp;quot;cylinder&amp;quot;, 1, 255, r, g, b, a)&lt;br /&gt;
		&lt;br /&gt;
	addEventHandler(&amp;quot;onClientRender&amp;quot;, getRootElement(), popMarkerUp)&lt;br /&gt;
end)&lt;br /&gt;
&lt;br /&gt;
function popMarkerUp()&lt;br /&gt;
	local now = getTickCount()&lt;br /&gt;
	local elapsedTime = now - g_Marker.startTime&lt;br /&gt;
	local duration = g_Marker.endTime - g_Marker.startTime&lt;br /&gt;
	local progress = elapsedTime / duration&lt;br /&gt;
&lt;br /&gt;
	local x1, y1, z1 = unpack(g_Marker.startPos)&lt;br /&gt;
	local x2, y2, z2 = unpack(g_Marker.endPos)&lt;br /&gt;
	local x, y, z = interpolateBetween ( &lt;br /&gt;
		x1, y1, z1,&lt;br /&gt;
		x2, y2, z2, &lt;br /&gt;
		progress, &amp;quot;OutBounce&amp;quot;)&lt;br /&gt;
		&lt;br /&gt;
	setElementPosition(g_Marker.marker, x, y, z)&lt;br /&gt;
			&lt;br /&gt;
	local r1, g1, b1, a1 = unpack(g_Marker.startColor)&lt;br /&gt;
	local r2, g2, b2, a2 = unpack(g_Marker.endColor)&lt;br /&gt;
	local r, g, b = interpolateBetween ( &lt;br /&gt;
		r1, g1, b1,&lt;br /&gt;
		r2, g2, b2, &lt;br /&gt;
		progress, &amp;quot;Linear&amp;quot;)&lt;br /&gt;
	local a = interpolateBetween ( &lt;br /&gt;
		a1, 0, 0,&lt;br /&gt;
		a2, 0, 0,&lt;br /&gt;
		progress, &amp;quot;Linear&amp;quot;)&lt;br /&gt;
		&lt;br /&gt;
	setMarkerColor(g_Marker.marker , r, g, b, a)&lt;br /&gt;
	&lt;br /&gt;
	if now &amp;gt;= g_Marker.endTime then&lt;br /&gt;
		removeEventHandler(&amp;quot;onClientRender&amp;quot;, getRootElement(), popMarkerUp)&lt;br /&gt;
		setTimer(&lt;br /&gt;
			function ()&lt;br /&gt;
				destroyElement(g_Marker.marker)&lt;br /&gt;
				g_Marker = nil&lt;br /&gt;
			end, 3000, 1)&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;
&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;
This clientside example uses interpolateBetween to create size and position interpolation (with effect) on a gui-window.&lt;br /&gt;
The command to test it is &amp;quot;/window&amp;quot;.&lt;br /&gt;
When the window pops up it uses &amp;quot;OutElastic&amp;quot; as the strEasingType to create the bouncing/elastic effect.&lt;br /&gt;
When it fades away, it uses &amp;quot;InQuad&amp;quot; to have an accelerating fading.&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;&lt;br /&gt;
local g_Window = nil&lt;br /&gt;
addCommandHandler(&amp;quot;window&amp;quot;,&lt;br /&gt;
function ()&lt;br /&gt;
	if g_Window then return end&lt;br /&gt;
	&lt;br /&gt;
	g_Window = {}&lt;br /&gt;
	&lt;br /&gt;
	local screenWidth, screenHeight = guiGetScreenSize()&lt;br /&gt;
	g_Window.windowWidth, g_Window.windowHeight = 400, 315&lt;br /&gt;
	local left = screenWidth/2 - g_Window.windowWidth/2&lt;br /&gt;
	local top = screenHeight/2 - g_Window.windowHeight/2&lt;br /&gt;
	&lt;br /&gt;
	g_Window.window = guiCreateWindow(left, top, g_Window.windowWidth, g_Window.windowHeight, &amp;quot;Interpolation on GUI&amp;quot;, false)&lt;br /&gt;
	&lt;br /&gt;
	g_Window.closeBtn = guiCreateButton(320, 285, 75, 23, &amp;quot;Close&amp;quot;, false, g_Window.window)&lt;br /&gt;
		&lt;br /&gt;
	guiWindowSetSizable(g_Window.window, false)&lt;br /&gt;
	guiWindowSetMovable(g_Window.window, false)&lt;br /&gt;
	guiSetEnabled(g_Window.window, false)&lt;br /&gt;
	guiSetVisible(g_Window.window, false)&lt;br /&gt;
	&lt;br /&gt;
	g_Window.startTime = getTickCount()&lt;br /&gt;
	g_Window.startSize = {0, 0}&lt;br /&gt;
	g_Window.endSize = {g_Window.windowWidth, g_Window.windowHeight}&lt;br /&gt;
	g_Window.endTime = g_Window.startTime + 1000&lt;br /&gt;
	addEventHandler(&amp;quot;onClientRender&amp;quot;, getRootElement(), popWindowUp)&lt;br /&gt;
end)&lt;br /&gt;
&lt;br /&gt;
function on_closeBtn_clicked(button, state, absoluteX, absoluteY)&lt;br /&gt;
	if (button ~= &amp;quot;left&amp;quot;) or (state ~= &amp;quot;up&amp;quot;) then&lt;br /&gt;
		return&lt;br /&gt;
	end&lt;br /&gt;
	&lt;br /&gt;
	if not g_Window then return end&lt;br /&gt;
	&lt;br /&gt;
	showCursor(false)&lt;br /&gt;
	guiSetEnabled(g_Window.window, false)&lt;br /&gt;
	guiWindowSetMovable(g_Window.window, false)&lt;br /&gt;
	&lt;br /&gt;
	local screenWidth, screenHeight = guiGetScreenSize()&lt;br /&gt;
	local posX, posY = guiGetPosition(g_Window.window, false)&lt;br /&gt;
	&lt;br /&gt;
	g_Window.startTime = getTickCount()&lt;br /&gt;
	g_Window.startSize = {g_Window.windowWidth, g_Window.windowHeight}&lt;br /&gt;
	g_Window.startCenter = &lt;br /&gt;
	{&lt;br /&gt;
		posX + g_Window.windowWidth/2,&lt;br /&gt;
		posY + g_Window.windowHeight/2,&lt;br /&gt;
	}&lt;br /&gt;
	&lt;br /&gt;
	g_Window.endSize = {0, 0}&lt;br /&gt;
	g_Window.endTime = g_Window.startTime + 1000&lt;br /&gt;
	g_Window.endCenter = &lt;br /&gt;
	{&lt;br /&gt;
		screenWidth, &lt;br /&gt;
		screenHeight&lt;br /&gt;
	}&lt;br /&gt;
	&lt;br /&gt;
	addEventHandler(&amp;quot;onClientRender&amp;quot;, getRootElement(), popWindowDown)&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
function popWindowUp()&lt;br /&gt;
	local now = getTickCount()&lt;br /&gt;
	local elapsedTime = now - g_Window.startTime&lt;br /&gt;
	local duration = g_Window.endTime - g_Window.startTime&lt;br /&gt;
	local progress = elapsedTime / duration&lt;br /&gt;
		&lt;br /&gt;
	local width, height, _ = interpolateBetween ( &lt;br /&gt;
		g_Window.startSize[1], g_Window.startSize[2], 0, &lt;br /&gt;
		g_Window.endSize[1], g_Window.endSize[2], 0, &lt;br /&gt;
		progress, &amp;quot;OutElastic&amp;quot;)&lt;br /&gt;
		&lt;br /&gt;
	guiSetSize(g_Window.window, width, height, false)&lt;br /&gt;
	&lt;br /&gt;
	local screenWidth, screenHeight = guiGetScreenSize()&lt;br /&gt;
	guiSetPosition(g_Window.window, screenWidth/2 - width/2, screenHeight/2 - height/2, false)&lt;br /&gt;
	&lt;br /&gt;
	if not guiGetVisible(g_Window.window) then&lt;br /&gt;
		guiSetVisible(g_Window.window, true)&lt;br /&gt;
		guiBringToFront(g_Window.window)&lt;br /&gt;
	end&lt;br /&gt;
	&lt;br /&gt;
	if now &amp;gt;= g_Window.endTime then&lt;br /&gt;
		guiSetEnabled(g_Window.window, true)&lt;br /&gt;
		&lt;br /&gt;
		guiBringToFront(g_Window.window)&lt;br /&gt;
		removeEventHandler(&amp;quot;onClientRender&amp;quot;, getRootElement(), popWindowUp)&lt;br /&gt;
		addEventHandler(&amp;quot;onClientGUIClick&amp;quot;, g_Window.closeBtn, on_closeBtn_clicked, false)&lt;br /&gt;
		showCursor(true)&lt;br /&gt;
		guiWindowSetMovable(g_Window.window, true)&lt;br /&gt;
	end&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
function popWindowDown()&lt;br /&gt;
	local now = getTickCount()&lt;br /&gt;
	local elapsedTime = now - g_Window.startTime&lt;br /&gt;
	local duration = g_Window.endTime - g_Window.startTime&lt;br /&gt;
	local progress = elapsedTime / duration&lt;br /&gt;
	&lt;br /&gt;
	local width, height, _ = interpolateBetween ( &lt;br /&gt;
		g_Window.startSize[1], g_Window.startSize[2], 0, &lt;br /&gt;
		g_Window.endSize[1], g_Window.endSize[2], 0, &lt;br /&gt;
		progress, &amp;quot;InQuad&amp;quot;)&lt;br /&gt;
		&lt;br /&gt;
	guiSetSize(g_Window.window, width, height, false)&lt;br /&gt;
	&lt;br /&gt;
	local centerX, centerY, _ = interpolateBetween ( &lt;br /&gt;
		g_Window.startCenter[1], g_Window.startCenter[2], 0, &lt;br /&gt;
		g_Window.endCenter[1], g_Window.endCenter[2], 0, &lt;br /&gt;
		progress, &amp;quot;InQuad&amp;quot;)&lt;br /&gt;
	&lt;br /&gt;
	guiSetPosition(g_Window.window, centerX - width/2, centerY - height/2, false)&lt;br /&gt;
	&lt;br /&gt;
	if now &amp;gt;= g_Window.endTime then&lt;br /&gt;
		removeEventHandler(&amp;quot;onClientRender&amp;quot;, getRootElement(), popWindowDown)&lt;br /&gt;
		destroyElement(g_Window.window)&lt;br /&gt;
		g_Window = nil&lt;br /&gt;
	end&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;
&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;
This clientside example uses interpolateBetween to create and position interpolation (with effect) on a camera.&lt;br /&gt;
The command to test it is &amp;quot;/ccam&amp;quot;.&lt;br /&gt;
When the camera pops up it uses &amp;quot;OutQuad&amp;quot; as the strEasingType to create the slow down effect.&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;&lt;br /&gt;
local enabled = false&lt;br /&gt;
 &lt;br /&gt;
addCommandHandler(&amp;quot;ccam&amp;quot;, function()&lt;br /&gt;
    enabled = not enabled&lt;br /&gt;
    if enabled then&lt;br /&gt;
        start = getTickCount()&lt;br /&gt;
        dx, dy, dz, lx, ly, lz = getCameraMatrix()&lt;br /&gt;
        addEventHandler(&amp;quot;onClientPreRender&amp;quot;, root, interpolateCam)&lt;br /&gt;
    else&lt;br /&gt;
        start = nil&lt;br /&gt;
        setCameraTarget(localPlayer)&lt;br /&gt;
        removeEventHandler(&amp;quot;onClientPreRender&amp;quot;, root, interpolateCam)&lt;br /&gt;
    end&lt;br /&gt;
end)&lt;br /&gt;
 &lt;br /&gt;
function interpolateCam()&lt;br /&gt;
    local now = getTickCount()&lt;br /&gt;
    local endTime = start + 2000&lt;br /&gt;
    local elapsedTime = now - start&lt;br /&gt;
    local duration = endTime - start&lt;br /&gt;
    local progress = elapsedTime / duration&lt;br /&gt;
    local px, py, pz = getElementPosition(localPlayer)&lt;br /&gt;
    local x, y, z = interpolateBetween ( dx, dy, dz, dx+4, dy+4, dz, progress, &amp;quot;OutQuad&amp;quot;)&lt;br /&gt;
    setCameraMatrix(x, y, z, px, py, pz+0.6, 0, 0)&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;
==See Also==&lt;br /&gt;
{{Utility functions}}&lt;/div&gt;</summary>
		<author><name>Krushofficial</name></author>
	</entry>
</feed>