The RedM developer’s field guide

Know the native.
Build the world.

Engine functions, framework docs, and game assets.
One reference. From the first lookup to the last line.

Explore / RedM

Documentation

02 / REFERENCE
CURRENT VIEWlearnings

learnings

PAGE 2 · 40 ENTRIES

re_*/mp_re_* peds spawn invisible without an outfit preset between CREATE_PED and _UPDATE_PED_VARIATION

learning:4
1 section

Routing an AI train through MULTIPLE forks: the global all-junctions toggle fails — clear all, then set each specific (trackHash, junctionIndex) per leg. Single-junction control DOES work

learning:40
1 section

Mission trains suppress BOTH enter and exit vehicle controls (player gets stuck in/out of seat); the game also re-seats an AI conductor on empty seats — script enter/exit + run a seat guard

learning:41
1 section

No standing knife/axe sharpen anim — use lean-table dict; the obvious `world_human_knife_sharpen` dict is fake

learning:42
1 section

CFX exports drop function-typed table fields — register plug-ins via globals, not exports

learning:43
1 section

RedM CreatePed Lua wrapper takes (hash, x, y, z, heading, networked, scriptHost, p7, p8) — NOT the GTAV (pedType, modelHash, ...) shape

learning:44
1 section

Stagecoach driver AI no-ops on TaskVehicleDriveToCoord and TaskVehicleGotoNavmesh in RedM open world — use stationary spawn or chain-spawned ambient events

learning:45
1 section

RedM multiplayer NPC events: use per-NPC nearest-threat targeting, not host-only or single-target

learning:46
1 section

GetHashFromString — RedM's string→hash global (joaat-equivalent), absent from native docs; use it for any Hash param built from a name

learning:47
1 section

Marshalling RDR3 native struct/array out-params: DataView with 8-byte stride, little-endian, zero-based offsets

learning:48
1 section

CreateVarString(10, 'LITERAL_STRING', text) — the VAR_STRING idiom required for all HUD/prompt/toast text

learning:49
1 section

BLIP_ADD_FOR_COORDS first arg is a BLIP_STYLE_* hash, not a sprite hash — passing a sprite returns a silent inert blip

learning:5
1 section

IsDuplicityVersion() is the canonical server/client switch (true = server); GetGameTimer() is client-only

learning:50
1 section

RDR3 prompt setup is a begin→configure→end transaction; any PromptSet* after PromptRegisterEnd never shows

learning:51
1 section

Prompt groups must be re-asserted every frame via PromptSetActiveGroupThisFrame or the group vanishes

learning:52
1 section

Hold-mode prompts complete via PromptHasHoldModeCompleted, not IsControlJustPressed

learning:53
1 section

SetNuiFocus(focus, cursor) is two independent bools; snapshot & restore prior focus on close or you leak input

learning:54
1 section

DisplayOnscreenKeyboard: poll UpdateOnscreenKeyboard() — 1=entered, 2=cancelled; title must be an AddTextEntry key

learning:55
1 section

Custom RDR3 HUD widgets: request UIFLOWBLOCK → poll UiflowblockIsLoaded → databind → UiflowblockEnter (strict ordering)

learning:56
1 section

_UI_FEED_POST_SAMPLE_TOAST_RIGHT (0xB249EBCB30DD88E0) — DataView struct layout for a right-side notification toast

learning:57
1 section

_UI_FEED_POST_SAMPLE_TOAST (0x26E87218390E6729) — left-card notification struct layout (dict/icon/color are joaat, not VarString)

learning:58
1 section

_UI_FEED_POST_TWO_TEXT_SHARD (0xA6F4216AB10EB08E) — RDR3 big top "mission" banner struct layout

learning:59
1 section

WORLD_CAMP_KIERAN_TIED_UP_COLD / TREE_TIED are paired scenarios — solo playback leaves the leash hanging in mid-air

learning:6
1 section

HUD/notification icons need RequestStreamedTextureDict + busy-wait before drawing, or the icon is blank

learning:60
1 section

RDR3 script-cam activation: CreateCam preset STRING + SetCamActive + RenderScriptCams; use SetCamActiveWithInterp when a cam already renders

learning:61
1 section

TaskPlayAnim (0xEA47FE3719165B94) silently no-ops unless the anim dict is loaded first

learning:62
1 section

GetAnimDuration (0x9FFAF4940A54CC09) returns SECONDS, not milliseconds

learning:63
1 section

DrawLightWithRange (0xD2D9E04C0DF927F4) is per-frame — re-issue every tick or the light vanishes

learning:64
1 section

Ped task sequences: Open→…→Close→ClearPedTasks→Perform→ClearSequenceTask (free the slot); GetScriptTaskStatus ≤1 means still running

learning:65
1 section

Metaped getter natives return data via Citizen.PointerValueInt() out-slots, not return values

learning:66
1 section

_GET_CATEGORY_OF_COMPONENT_AT_INDEX (0x9B90842304C938A7): p2 is the metaped type (0=human, 6=horse), not "Any"

learning:67
1 section

_GET_SHOP_ITEM_COMPONENT_CATEGORY (0x5FF9A878C3D115B8): falsy with isMP=true means it's an SP component — retry with false

learning:68
1 section

Ped texture overlays (makeup/scars/aging) only work on NETWORKED peds — silently fail on local entities

learning:69
1 section

Ped texture overlay lifecycle: _REQUEST_TEXTURE returns -1 on fail; must _UPDATE_PED_TEXTURE (else black) + _RELEASE_TEXTURE (32-handle cap)

learning:70
1 section

Texture-layer natives take Hash args (GetHashFromString); palette/tint only apply when blendType == 0

learning:71
1 section

_UPDATE_PED_TEXTURE / _RELEASE_TEXTURE / _IS_TEXTURE_VALID take the textureId handle, NOT the ped

learning:72
1 section

SetEntityAlpha on a draft wagon doesn't fade hitched horses or reins — enumerate harness peds + HideHorseReins

learning:73
1 section

horse_feathers component category hash is hardcoded -287556490, not joaat('horse_feathers')

learning:74
1 section

GetResourceState returns one of {missing, stopped, starting, started} — bare == 'started' races boot order

learning:75
1 section

GetConvar always returns a string — `if GetConvar(x)` is truthy even for "false"

learning:76
1 section

A living reference. Documentation coverage varies by native and source.