<?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=Andres28</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=Andres28"/>
	<link rel="alternate" type="text/html" href="https://wiki.multitheftauto.com/wiki/Special:Contributions/Andres28"/>
	<updated>2026-05-17T09:05:37Z</updated>
	<subtitle>User contributions</subtitle>
	<generator>MediaWiki 1.39.3</generator>
	<entry>
		<id>https://wiki.multitheftauto.com/index.php?title=DxSetBlendMode&amp;diff=75541</id>
		<title>DxSetBlendMode</title>
		<link rel="alternate" type="text/html" href="https://wiki.multitheftauto.com/index.php?title=DxSetBlendMode&amp;diff=75541"/>
		<updated>2022-09-30T22:19:12Z</updated>

		<summary type="html">&lt;p&gt;Andres28: /* Example */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{Client function}}&lt;br /&gt;
__NOTOC__&lt;br /&gt;
This function sets the current blend mode for the dxDraw functions. Changing the blend mode can increase the quality when drawing text or certain other images to a render target. As a general guide use '''modulate_add''' when drawing text to a render target, and '''add''' when drawing the render target to the screen. Don't forget to restore the default '''blend''' at the end - See the example below.&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 dxSetBlendMode ( string blendMode )&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt; &lt;br /&gt;
&lt;br /&gt;
===Required Arguments===&lt;br /&gt;
*'''blendMode :''' The blend mode to use which can be one of:&lt;br /&gt;
**'''blend:''' The source textures are alpha blended to the screen/render target. This is the default mode for drawing and gives the results we all know and love.&lt;br /&gt;
**'''add:''' The source textures are added to the screen/render target.&lt;br /&gt;
**'''modulate_add:''' The source textures are multiplied by the alpha and then added to the screen/render target.&lt;br /&gt;
**'''overwrite :''' The source textures are overwritten. This can be useful for clearing render targets.&lt;br /&gt;
&lt;br /&gt;
==Returns==&lt;br /&gt;
Returns true if successful, or ''false'' if invalid arguments were passed to the function.&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;
This example shows how to use '''modulate_add''' and '''add''' to avoid quality problems when using a render target:&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;&lt;br /&gt;
local myRenderTarget = dxCreateRenderTarget(500, 500, true)&lt;br /&gt;
&lt;br /&gt;
--&lt;br /&gt;
-- Function to draw text to our render target texture when the 'r' key is pressed&lt;br /&gt;
--&lt;br /&gt;
function updateRenderTarget()&lt;br /&gt;
    dxSetRenderTarget(myRenderTarget, true)&lt;br /&gt;
    dxSetBlendMode(&amp;quot;modulate_add&amp;quot;)  -- Set 'modulate_add' when drawing stuff on the render target&lt;br /&gt;
&lt;br /&gt;
    dxDrawText(&amp;quot;Testing &amp;quot;..getTickCount(), 0, 0, 0, 0, tocolor(255, 255, 255, 255), 2, &amp;quot;clear&amp;quot;)&lt;br /&gt;
&lt;br /&gt;
    dxSetBlendMode(&amp;quot;blend&amp;quot;)         -- Restore default blending&lt;br /&gt;
    dxSetRenderTarget()             -- Restore default render target&lt;br /&gt;
end&lt;br /&gt;
bindKey(&amp;quot;r&amp;quot;, &amp;quot;down&amp;quot;, updateRenderTarget )&lt;br /&gt;
&lt;br /&gt;
--&lt;br /&gt;
-- Display render target contents&lt;br /&gt;
--&lt;br /&gt;
addEventHandler(&amp;quot;onClientRender&amp;quot;, root,&lt;br /&gt;
    function()&lt;br /&gt;
        dxSetBlendMode(&amp;quot;add&amp;quot;)       -- Set 'add' when drawing the render target on the screen&lt;br /&gt;
        dxDrawImage(100, 200, 500, 500, myRenderTarget, -10)&lt;br /&gt;
        dxSetBlendMode(&amp;quot;blend&amp;quot;)     -- Restore default blending&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;
==Requirements==&lt;br /&gt;
{{Requirements|n/a|1.3.0-9.03782|}}&lt;br /&gt;
&lt;br /&gt;
==Changelog==&lt;br /&gt;
{{ChangelogHeader}}&lt;br /&gt;
{{ChangelogItem|1.3.0-9.04425|Added overwrite }}&lt;br /&gt;
&lt;br /&gt;
==See Also==&lt;br /&gt;
{{Drawing_functions}}&lt;br /&gt;
&lt;br /&gt;
[[hu:dxSetBlendMode]]&lt;/div&gt;</summary>
		<author><name>Andres28</name></author>
	</entry>
	<entry>
		<id>https://wiki.multitheftauto.com/index.php?title=GetVehicleRespawnPosition&amp;diff=75539</id>
		<title>GetVehicleRespawnPosition</title>
		<link rel="alternate" type="text/html" href="https://wiki.multitheftauto.com/index.php?title=GetVehicleRespawnPosition&amp;diff=75539"/>
		<updated>2022-09-29T01:21:24Z</updated>

		<summary type="html">&lt;p&gt;Andres28: /* Example */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{Server function}}&lt;br /&gt;
__NOTOC__&lt;br /&gt;
{{New feature/item|3.0156|1.5.5|14053|This function retrieves the respawn coordinates of a [[vehicle]].}}&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 getVehicleRespawnPosition ( element theVehicle )&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
{{OOP||[[vehicle]]:getRespawnPosition|respawnPosition|setVehicleRespawnPosition}}&lt;br /&gt;
&lt;br /&gt;
===Required Arguments===&lt;br /&gt;
*'''theVehicle:''' The [[vehicle]] which you'd like to retrieve the respawn coordinates of.&lt;br /&gt;
&lt;br /&gt;
===Returns===&lt;br /&gt;
Returns three [[float|floats]] indicating the respawn coordinates of the [[vehicle]], ''x'', ''y'' and ''z'' respectively.&lt;br /&gt;
&lt;br /&gt;
==Example==&lt;br /&gt;
This example outputs the player's current vehicle respawn position.&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;
function getRespawnPosition(player)&lt;br /&gt;
    local veh = getPedOccupiedVehicle(player) &lt;br /&gt;
    if veh then &lt;br /&gt;
        local x,y,z = getVehicleRespawnPosition(veh)&lt;br /&gt;
        local rx,ry,rz = getVehicleRespawnRotation(veh)&lt;br /&gt;
        outputChatBox(&amp;quot;this car respawn in x = &amp;quot;..x..&amp;quot; y = &amp;quot;..y..&amp;quot; z = &amp;quot;..z..&amp;quot; rx = &amp;quot;..rx..&amp;quot; ry = &amp;quot;..rz,player,0,255,0)&lt;br /&gt;
    else&lt;br /&gt;
        outputChatBox(&amp;quot;you are not in the car&amp;quot;,player,255,0,0)&lt;br /&gt;
    end&lt;br /&gt;
end &lt;br /&gt;
addCommandHandler(&amp;quot;getRespawnPos&amp;quot;,getRespawnPosition)&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;
{{Vehicle_functions}}&lt;/div&gt;</summary>
		<author><name>Andres28</name></author>
	</entry>
	<entry>
		<id>https://wiki.multitheftauto.com/index.php?title=GetVehicleRespawnRotation&amp;diff=75538</id>
		<title>GetVehicleRespawnRotation</title>
		<link rel="alternate" type="text/html" href="https://wiki.multitheftauto.com/index.php?title=GetVehicleRespawnRotation&amp;diff=75538"/>
		<updated>2022-09-29T01:20:39Z</updated>

		<summary type="html">&lt;p&gt;Andres28: /* Example */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{Server function}}&lt;br /&gt;
__NOTOC__&lt;br /&gt;
{{New feature/item|3.0156|1.5.5|14053|This function retrieves the respawn rotation of a [[vehicle]].}}&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 getVehicleRespawnRotation ( element theVehicle )&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
{{OOP||[[vehicle]]:getRespawnRotation|respawnRotation}}&lt;br /&gt;
&lt;br /&gt;
===Required Arguments===&lt;br /&gt;
*'''theVehicle:''' The [[vehicle]] which you'd like to retrieve the respawn rotation of.&lt;br /&gt;
&lt;br /&gt;
===Returns===&lt;br /&gt;
Returns three [[float|floats]] indicating the respawn rotation of the [[vehicle]], ''x'', ''y'' and ''z'' respectively.&lt;br /&gt;
&lt;br /&gt;
==Example==&lt;br /&gt;
This example outputs the player's current vehicle respawn position.&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;
function getRespawnPosition(player)&lt;br /&gt;
    local veh = getPedOccupiedVehicle(player) &lt;br /&gt;
    if veh then &lt;br /&gt;
        local x,y,z = getVehicleRespawnPosition(veh)&lt;br /&gt;
        local rx,ry,rz = getVehicleRespawnRotation(veh)&lt;br /&gt;
        outputChatBox(&amp;quot;this car respawn in x = &amp;quot;..x..&amp;quot; y = &amp;quot;..y..&amp;quot; z = &amp;quot;..z..&amp;quot; rx = &amp;quot;..rx..&amp;quot; ry = &amp;quot;..rz,player,0,255,0)&lt;br /&gt;
    else&lt;br /&gt;
        outputChatBox(&amp;quot;you are not in the car&amp;quot;,player,255,0,0)&lt;br /&gt;
    end&lt;br /&gt;
end &lt;br /&gt;
addCommandHandler(&amp;quot;getRespawnPos&amp;quot;,getRespawnPosition)&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;
{{Vehicle_functions}}&lt;/div&gt;</summary>
		<author><name>Andres28</name></author>
	</entry>
	<entry>
		<id>https://wiki.multitheftauto.com/index.php?title=GetVehicleRespawnRotation&amp;diff=75537</id>
		<title>GetVehicleRespawnRotation</title>
		<link rel="alternate" type="text/html" href="https://wiki.multitheftauto.com/index.php?title=GetVehicleRespawnRotation&amp;diff=75537"/>
		<updated>2022-09-29T01:19:48Z</updated>

		<summary type="html">&lt;p&gt;Andres28: /* Example */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{Server function}}&lt;br /&gt;
__NOTOC__&lt;br /&gt;
{{New feature/item|3.0156|1.5.5|14053|This function retrieves the respawn rotation of a [[vehicle]].}}&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 getVehicleRespawnRotation ( element theVehicle )&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
{{OOP||[[vehicle]]:getRespawnRotation|respawnRotation}}&lt;br /&gt;
&lt;br /&gt;
===Required Arguments===&lt;br /&gt;
*'''theVehicle:''' The [[vehicle]] which you'd like to retrieve the respawn rotation of.&lt;br /&gt;
&lt;br /&gt;
===Returns===&lt;br /&gt;
Returns three [[float|floats]] indicating the respawn rotation of the [[vehicle]], ''x'', ''y'' and ''z'' respectively.&lt;br /&gt;
&lt;br /&gt;
==Example==&lt;br /&gt;
This example outputs the player's current vehicle respawn position.&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 &amp;gt;&lt;br /&gt;
function getRespawnPosition(player)&lt;br /&gt;
    local veh = getPedOccupiedVehicle(player) &lt;br /&gt;
    if veh then &lt;br /&gt;
        local x,y,z = getVehicleRespawnPosition(veh)&lt;br /&gt;
        local rx,ry,rz = getVehicleRespawnRotation(veh)&lt;br /&gt;
        outputChatBox(&amp;quot;this car respawn in x = &amp;quot;..x..&amp;quot; y = &amp;quot;..y..&amp;quot; z = &amp;quot;..z..&amp;quot; rx = &amp;quot;..rx..&amp;quot; ry = &amp;quot;..rz,player,0,255,0)&lt;br /&gt;
    else&lt;br /&gt;
        outputChatBox(&amp;quot;you are not in the car&amp;quot;,player,255,0,0)&lt;br /&gt;
    end&lt;br /&gt;
end &lt;br /&gt;
addCommandHandler(&amp;quot;getRespawnPos&amp;quot;,getRespawnPosition)&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;
{{Vehicle_functions}}&lt;/div&gt;</summary>
		<author><name>Andres28</name></author>
	</entry>
	<entry>
		<id>https://wiki.multitheftauto.com/index.php?title=GetVehicleRespawnPosition&amp;diff=75536</id>
		<title>GetVehicleRespawnPosition</title>
		<link rel="alternate" type="text/html" href="https://wiki.multitheftauto.com/index.php?title=GetVehicleRespawnPosition&amp;diff=75536"/>
		<updated>2022-09-29T01:18:25Z</updated>

		<summary type="html">&lt;p&gt;Andres28: /* Example */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{Server function}}&lt;br /&gt;
__NOTOC__&lt;br /&gt;
{{New feature/item|3.0156|1.5.5|14053|This function retrieves the respawn coordinates of a [[vehicle]].}}&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 getVehicleRespawnPosition ( element theVehicle )&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
{{OOP||[[vehicle]]:getRespawnPosition|respawnPosition|setVehicleRespawnPosition}}&lt;br /&gt;
&lt;br /&gt;
===Required Arguments===&lt;br /&gt;
*'''theVehicle:''' The [[vehicle]] which you'd like to retrieve the respawn coordinates of.&lt;br /&gt;
&lt;br /&gt;
===Returns===&lt;br /&gt;
Returns three [[float|floats]] indicating the respawn coordinates of the [[vehicle]], ''x'', ''y'' and ''z'' respectively.&lt;br /&gt;
&lt;br /&gt;
==Example==&lt;br /&gt;
This example outputs the player's current vehicle respawn position.&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 &amp;gt;&lt;br /&gt;
function getRespawnPosition(player)&lt;br /&gt;
    local veh = getPedOccupiedVehicle(player) &lt;br /&gt;
    if veh then &lt;br /&gt;
        local x,y,z = getVehicleRespawnPosition(veh)&lt;br /&gt;
        local rx,ry,rz = getVehicleRespawnRotation(veh)&lt;br /&gt;
        outputChatBox(&amp;quot;this car respawn in x = &amp;quot;..x..&amp;quot; y = &amp;quot;..y..&amp;quot; z = &amp;quot;..z..&amp;quot; rx = &amp;quot;..rx..&amp;quot; ry = &amp;quot;..rz,player,0,255,0)&lt;br /&gt;
    else&lt;br /&gt;
        outputChatBox(&amp;quot;you are not in the car&amp;quot;,player,255,0,0)&lt;br /&gt;
    end&lt;br /&gt;
end &lt;br /&gt;
addCommandHandler(&amp;quot;getRespawnPos&amp;quot;,getRespawnPosition)&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;
{{Vehicle_functions}}&lt;/div&gt;</summary>
		<author><name>Andres28</name></author>
	</entry>
	<entry>
		<id>https://wiki.multitheftauto.com/index.php?title=GetVehicleRespawnPosition&amp;diff=75535</id>
		<title>GetVehicleRespawnPosition</title>
		<link rel="alternate" type="text/html" href="https://wiki.multitheftauto.com/index.php?title=GetVehicleRespawnPosition&amp;diff=75535"/>
		<updated>2022-09-29T01:16:26Z</updated>

		<summary type="html">&lt;p&gt;Andres28: /* Example */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{Server function}}&lt;br /&gt;
__NOTOC__&lt;br /&gt;
{{New feature/item|3.0156|1.5.5|14053|This function retrieves the respawn coordinates of a [[vehicle]].}}&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 getVehicleRespawnPosition ( element theVehicle )&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
{{OOP||[[vehicle]]:getRespawnPosition|respawnPosition|setVehicleRespawnPosition}}&lt;br /&gt;
&lt;br /&gt;
===Required Arguments===&lt;br /&gt;
*'''theVehicle:''' The [[vehicle]] which you'd like to retrieve the respawn coordinates of.&lt;br /&gt;
&lt;br /&gt;
===Returns===&lt;br /&gt;
Returns three [[float|floats]] indicating the respawn coordinates of the [[vehicle]], ''x'', ''y'' and ''z'' respectively.&lt;br /&gt;
&lt;br /&gt;
==Example==&lt;br /&gt;
This example outputs the player's current vehicle respawn position.&lt;br /&gt;
&amp;lt;syntaxhighlight name=&amp;quot;Server&amp;quot; class=&amp;quot;server&amp;quot; show=&amp;quot;true&amp;quot;&amp;gt;&lt;br /&gt;
function getRespawnPosition(player)&lt;br /&gt;
    local veh = getPedOccupiedVehicle(player) &lt;br /&gt;
    if veh then &lt;br /&gt;
        local x,y,z = getVehicleRespawnPosition(veh)&lt;br /&gt;
        local rx,ry,rz = getVehicleRespawnRotation(veh)&lt;br /&gt;
        outputChatBox(&amp;quot;this car respawn in x = &amp;quot;..x..&amp;quot; y = &amp;quot;..y..&amp;quot; z = &amp;quot;..z..&amp;quot; rx = &amp;quot;..rx..&amp;quot; ry = &amp;quot;..rz,player,0,255,0)&lt;br /&gt;
    else&lt;br /&gt;
        outputChatBox(&amp;quot;you are not in the car&amp;quot;,player,255,0,0)&lt;br /&gt;
    end&lt;br /&gt;
end &lt;br /&gt;
addCommandHandler(&amp;quot;getRespawnPos&amp;quot;,getRespawnPosition)&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==See Also==&lt;br /&gt;
{{Vehicle_functions}}&lt;/div&gt;</summary>
		<author><name>Andres28</name></author>
	</entry>
</feed>