<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
	<id>https://wiki.gtaconnected.com/wiki/index.php?action=history&amp;feed=atom&amp;title=natives.drawSprite</id>
	<title>natives.drawSprite - Revision history</title>
	<link rel="self" type="application/atom+xml" href="https://wiki.gtaconnected.com/wiki/index.php?action=history&amp;feed=atom&amp;title=natives.drawSprite"/>
	<link rel="alternate" type="text/html" href="https://wiki.gtaconnected.com/wiki/index.php?title=natives.drawSprite&amp;action=history"/>
	<updated>2026-04-29T04:33:04Z</updated>
	<subtitle>Revision history for this page on the wiki</subtitle>
	<generator>MediaWiki 1.39.15</generator>
	<entry>
		<id>https://wiki.gtaconnected.com/wiki/index.php?title=natives.drawSprite&amp;diff=11275&amp;oldid=prev</id>
		<title>ChrisGame20: Created page with &quot;{{ScriptItem |endpoint = client |games = iv |type = function |name = natives.drawSprite |parameters = int texture, float x, float y, float width, float height, float rotation, int r, int g, int b, int a |parameter1 = int texture Handle of the texture obtained with natives.getTexture |parameter2 = float x Normalized X coordinate (0.0–1.0) for the sprite’s center |parameter3 = float y Normalized Y coordinate (0.0–1.0) for the sprite’s center |parameter4 = float...&quot;</title>
		<link rel="alternate" type="text/html" href="https://wiki.gtaconnected.com/wiki/index.php?title=natives.drawSprite&amp;diff=11275&amp;oldid=prev"/>
		<updated>2025-11-28T00:37:39Z</updated>

		<summary type="html">&lt;p&gt;Created page with &amp;quot;{{ScriptItem |endpoint = client |games = iv |type = function |name = natives.drawSprite |parameters = int texture, float x, float y, float width, float height, float rotation, int r, int g, int b, int a |parameter1 = int texture Handle of the texture obtained with &lt;a href=&quot;/natives.getTexture&quot; title=&quot;natives.getTexture&quot;&gt;natives.getTexture&lt;/a&gt; |parameter2 = float x Normalized X coordinate (0.0–1.0) for the sprite’s center |parameter3 = float y Normalized Y coordinate (0.0–1.0) for the sprite’s center |parameter4 = float...&amp;quot;&lt;/p&gt;
&lt;p&gt;&lt;b&gt;New page&lt;/b&gt;&lt;/p&gt;&lt;div&gt;{{ScriptItem&lt;br /&gt;
|endpoint = client&lt;br /&gt;
|games = iv&lt;br /&gt;
|type = function&lt;br /&gt;
|name = natives.drawSprite&lt;br /&gt;
|parameters = int texture, float x, float y, float width, float height, float rotation, int r, int g, int b, int a&lt;br /&gt;
|parameter1 = int texture Handle of the texture obtained with [[natives.getTexture]]&lt;br /&gt;
|parameter2 = float x Normalized X coordinate (0.0–1.0) for the sprite’s center&lt;br /&gt;
|parameter3 = float y Normalized Y coordinate (0.0–1.0) for the sprite’s center&lt;br /&gt;
|parameter4 = float width Width of the sprite relative to screen size&lt;br /&gt;
|parameter5 = float height Height of the sprite relative to screen size&lt;br /&gt;
|parameter6 = float rotation Rotation angle in degrees (clockwise)&lt;br /&gt;
|parameter7 = int r Red color value (0–255)&lt;br /&gt;
|parameter8 = int g Green color value (0–255)&lt;br /&gt;
|parameter9 = int b Blue color value (0–255)&lt;br /&gt;
|parameter10 = int a Alpha transparency value (0–255)&lt;br /&gt;
|usage = Draws a textured sprite on the screen at the specified position, size, rotation, and color&lt;br /&gt;
|notes = &lt;br /&gt;
- The texture must be loaded first using [[natives.loadTxd]] and [[natives.getTexture]]&lt;br /&gt;
- This function must be called inside a rendering event such as [[OnDrawnHUD]] so the sprite is drawn each frame&lt;br /&gt;
|return1 = void&lt;br /&gt;
|returnFail1 = void&lt;br /&gt;
|exampleJS = addEventHandler(&amp;quot;OnDrawnHUD&amp;quot;, function() {&lt;br /&gt;
    // Load TXD and get texture once&lt;br /&gt;
    const txdId = natives.loadTxd(&amp;quot;frontend_360&amp;quot;);&lt;br /&gt;
    const neonTex = natives.getTexture(txdId, &amp;quot;neon&amp;quot;);&lt;br /&gt;
&lt;br /&gt;
    // Draw the texture as a sprite in the center of the screen&lt;br /&gt;
    if (neonTex) {&lt;br /&gt;
        natives.drawSprite(neonTex, 0.5, 0.5, 0.3, 0.2, 0.0, 255, 255, 255, 255);&lt;br /&gt;
    }&lt;br /&gt;
});&lt;br /&gt;
}}&lt;/div&gt;</summary>
		<author><name>ChrisGame20</name></author>
	</entry>
</feed>