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.
0xE550CDE128D56757SetTextRenderId0x5F15302936E07111Signature
void SET_TEXT_RENDER_ID(int renderId);Parameters
| Name | Type | Description |
|---|---|---|
renderId | int | 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 screenRender 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
SetTextRenderId(renderId)
-- always works, by hash
Citizen.InvokeNative(0xE550CDE128D56757, renderId)JavaScript and C#
SetTextRenderId(renderId);
// by hash
Citizen.invokeNative('0xE550CDE128D56757', renderId);Function.Call((Hash)0xE550CDE128D56757, renderId);See also
DRAW_RECTDraws a rectangle on the screen.LINK_NAMED_RENDERTARGETREGISTER_NAMED_RENDERTARGETGET_NAMED_RENDERTARGET_RENDER_ID
Sources
alloc8or RDR3 NativeDB · RedM Natives (verified notes)
Something wrong or missing? Contribute a verified note — corrections ship through pull requests.