RedM Natives

Contribute

Notes live as Markdown files in the portal's repository and ship through pull requests. The public repository link will appear here once it is published.

What goes here

Upstream databases (alloc8or, VORPCORE, Cfx, Halen84, femga) are pulled as they are and never edited in place. This folder is the portal's own layer on top: things someone verified in game and wants every RedM developer — and every AI agent — to see next to the native.

  • overlay/natives/.md — notes for one native, keyed by its 64-bit hash (0xD42BD6EB2E0F1677.md).
  • overlay/enums/.md — an enum or flag set that no upstream source documents yet.

If the upstream text is simply wrong, also open an issue or PR with that source, so the fix reaches everyone.

A native note

---
hash: '0xD42BD6EB2E0F1677'
summary: Returns true while the handle points to an entity that exists.
params:
  entity: Any entity handle (ped, vehicle, object).
returns: true if the entity exists.
tested_build: '1491'
contributors: [your-handle]
tags: [entity]
related: [DELETE_ENTITY]
---

What you checked, what surprised you, and a snippet that runs:

```lua
if DoesEntityExist(ped) then
    DeleteEntity(ped)
end
```
Field Use
hash Required. The 64-bit hash, quoted.
name Only for natives with no name yet (_0x…). Renaming a named native needs proof upstream; put alternative names in aliases.
aliases Other names people search for.
summary One sentence shown in lists and search results.
params Description per parameter, keyed by its current name (p0, entity…). Use the list form - { name: p2, rename: flags, description: … } to propose a better name.
returns What the return value means.
tested_build Game build where you verified it (1491).
contributors Your handle(s).
related Other natives (name or hash) that belong together.
enums Enum names to link.

The body is Markdown. Keep it factual: what happens, under which conditions, and the smallest example that shows it.

An enum

---
name: ePromptType
natives: ['0x0751D461F06E41CE']
---

```cpp
enum ePromptType
{
	PROMPT_TYPE_PRESS = 0,
	PROMPT_TYPE_HOLD = 1, // a trailing comment becomes the note column
};
```

Values may be decimal, hex or (1 << n); a trailing // comment becomes the note column.

Rules for merging

  1. Verified beats plausible. Say what you tested and on which build; mark guesses as guesses.
  2. Credit sources. If a note comes from someone else's research, link it.
  3. One native per file, hash as the filename.
  4. Examples must run as written in a RedM client or server script.

Preview locally

bun install
bun run sync      # download upstream sources (pinned in data/sources.lock.json)
bun run build     # client bundle + database; prints overlay problems
bun run dev       # http://127.0.0.1:3060

bun run build:db --strict fails on any overlay problem — CI runs it on every pull request.