RedM Natives

SET_TEXT_RENDER_ID

Redirects script 2D draws (DRAW_RECT, DRAW_SPRITE, text) to a named render target. Pass 0 to go back to the screen, not 1 as in GTA V.

Hash0xE550CDE128D56757
Runtime nameSetTextRenderId
NamespaceHUD
SideClient
NameOfficial
Docs
Since build1207
GTA V hash0x5F15302936E07111

Signature

void SET_TEXT_RENDER_ID(int renderId);

Parameters

NameTypeDescription
renderIdint

Value returned by GET_NAMED_RENDERTARGET_RENDER_ID, or 0 for the screen.

Returns void

Verified notes

Reviewed in this portal's repository · tested on build 1491 · by borderline-rp

RDR3 has no GET_DEFAULT_SCRIPT_RENDERTARGET_RENDER_ID, and Rockstar's own scripts never set the render id back after drawing on a prop. The value that means "the screen" is 0. The GTA V value 1 is wrong here: after SetTextRenderId(1) on-screen DRAW_RECT calls draw nothing, and rectangles and text come back after SetTextRenderId(0).

The render id is not per resource. All resources run in the same script thread, so a resource that leaves a render target (or 1) selected also hides what every other resource draws on screen. Set 0 again before you yield:

local id = GetNamedRendertargetRenderId('bla_theater')
SetTextRenderId(id)
DrawRect(0.5, 0.5, 1.0, 1.0, 0, 0, 0, 255, false, true) -- on the prop
SetTextRenderId(0)                                      -- back to the screen

Render ids are 32-bit hash-like values (for example 2017109840), not small indices.

Verified in game on the Borderline RP server, October 2026: a second resource drawing a rectangle and a text label every frame lost the rectangle while another resource reset to 1, and showed both again with 0.

Usage

Lua
SetTextRenderId(renderId)

-- always works, by hash
Citizen.InvokeNative(0xE550CDE128D56757, renderId)
JavaScript and C#
JavaScript
SetTextRenderId(renderId);

// by hash
Citizen.invokeNative('0xE550CDE128D56757', renderId);
C#
Function.Call((Hash)0xE550CDE128D56757, renderId);

See also

Sources

alloc8or RDR3 NativeDB · RedM Natives (verified notes)

Something wrong or missing? Contribute a verified note — corrections ship through pull requests.