The Lab
GRAPHICS native

DRAW_RECT

returns void10 paramsbuild 1207

Draws a rectangle on screen at x, y (center, normalized) with the given size and RGBA color for the current frame.

Signature

C
void DRAW_RECT(float x, float y, float width, float height, int red, int green, int blue, int alpha, BOOL p8, BOOL p9); // 0x405224591DF02025 b1207

Parameters

#NameType
1xfloat
2yfloat
3widthfloat
4heightfloat
5redint
6greenint
7blueint
8alphaint
9p8BOOL
10p9BOOL

Facts

Facts about DRAW_RECT
Name
DRAW_RECT
Hash
0x405224591DF02025
Namespace
Returns
void
Game build
1207

Examples

Calls by hash work in every RedM runtime. Replace the placeholder arguments with your own values.

Lua
Citizen.InvokeNative(0x405224591DF02025, -- DRAW_RECT
  0.0, -- float x
  0.0, -- float y
  0.0, -- float width
  0.0, -- float height
  0, -- int red
  0, -- int green
  0, -- int blue
  0, -- int alpha
  false, -- BOOL p8
  false -- BOOL p9
)
JavaScript
// Whole JS numbers are sent as integers: pass floats like 1.5 (or n + 0.0000001), never 1.
Citizen.invokeNative("0x405224591DF02025", // DRAW_RECT
  0.0, // float x
  0.0, // float y
  0.0, // float width
  0.0, // float height
  0, // int red
  0, // int green
  0, // int blue
  0, // int alpha
  false, // BOOL p8
  false // BOOL p9
);
C#
Function.Call((Hash)0x405224591DF02025, // DRAW_RECT
  0.0f, // float x
  0.0f, // float y
  0.0f, // float width
  0.0f, // float height
  0, // int red
  0, // int green
  0, // int blue
  0, // int alpha
  false, // BOOL p8
  false // BOOL p9
);
All GRAPHICS natives

Facts compiled from community research (alloc8or/rdr3-nativedb-data, femga/rdr3_discoveries); descriptions and examples by The Lab.