DRAW_RECT
Draws a rectangle on screen at x, y (center, normalized) with the given size and RGBA color for the current frame.
Signature
void DRAW_RECT(float x, float y, float width, float height, int red, int green, int blue, int alpha, BOOL p8, BOOL p9); // 0x405224591DF02025 b1207Parameters
| # | Name | Type |
|---|---|---|
| 1 | x | float |
| 2 | y | float |
| 3 | width | float |
| 4 | height | float |
| 5 | red | int |
| 6 | green | int |
| 7 | blue | int |
| 8 | alpha | int |
| 9 | p8 | BOOL |
| 10 | p9 | BOOL |
Facts
| 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.
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
)// 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
);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
);Related GRAPHICS natives
Facts compiled from community research (alloc8or/rdr3-nativedb-data, femga/rdr3_discoveries); descriptions and examples by The Lab.