The FiveM 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.
knowledge base
Explore / FiveM
Native reference
- GRAPHICSint
CREATE_CHECKPOINT
``` Creates a checkpoint. Returns the handle of the checkpoint. 20/03/17 : Attention, checkpoints are already handled by the game itself, so you must not loop it like markers. Parameters: * type - The type of checkpoint to create. See below for a list of checkpoint types. * pos1 - The position of the checkpoint. * pos2 - The position of the next checkpoint to point to. * diameter - The diameter of the checkpoint. * color - The color of the checkpoint. * reserved - Special parameter, see below for details. Usually set to 0 in the scripts. Checkpoint types (prior to game build 2189): 0-4---------Cylinder: 1 arrow, 2 arrow, 3 arrows, CycleArrow, Checker 5-9---------Cylinder: 1 arrow, 2 arrow, 3 arrows, CycleArrow, Checker 10-14-------Ring: 1 arrow, 2 arrow, 3 arrows, CycleArrow, Checker 15-19-------1 arrow, 2 arrow, 3 arrows, CycleArrow, Checker 20-24-------Cylinder: 1 arrow, 2 arrow, 3 arrows, CycleArrow, Checker 25-29-------Cylinder: 1 arrow, 2 arrow, 3 arrows, CycleArrow, Checker 30-34-------Cylinder: 1 arrow, 2 arrow, 3 arrows, CycleArrow, Checker 35-38-------Ring: Airplane Up, Left, Right, UpsideDown 39----------? 40----------Ring: just a ring 41----------? 42-44-------Cylinder w/ number (uses 'reserved' parameter) 45-47-------Cylinder no arrow or number If using type 42-44, reserved sets number / number and shape to display 0-99------------Just numbers (0-99) 100-109-----------------Arrow (0-9) 110-119------------Two arrows (0-9) 120-129----------Three arrows (0-9) 130-139----------------Circle (0-9) 140-149------------CycleArrow (0-9) 150-159----------------Circle (0-9) 160-169----Circle w/ pointer (0-9) 170-179-------Perforated ring (0-9) 180-189----------------Sphere (0-9) ``` [Checkpoint Types](https://docs.fivem.net/docs/game-references/checkpoints/) as of game build 2189
0x0134F0835AB6BFCB - GRAPHICSint
CREATE_TRACKED_POINT
Creates a tracked point: useful for checking the visibility of a 3D point on screen. Tracked points must be manually managed and will not be destroyed on resource stop (they are not an instance of CScriptResource). See [`DESTROY_TRACKED_POINT`](#\_0xB25DC90BAD56CA42) and [onResourceStop](https://docs.fivem.net/docs/scripting-reference/events/list/onResourceStop/). Only 64 points may be tracked at a given time.
0xE2C9439ED45DEA60 - GRAPHICSvoid
DELETE_CHECKPOINT
Description not yet documented
0xF5ED37F54CD4D52E - GRAPHICSvoid
DESTROY_TRACKED_POINT
Description not yet documented
0xB25DC90BAD56CA42 - GRAPHICSvoid
DISABLE_MOON_CYCLE_OVERRIDE
Removes any custom moon cycle overrides that have been configured with [ENABLE_MOON_CYCLE_OVERRIDE](#\_0x2C328AF17210F009)
0x2BF72AD5B41AA739 - GRAPHICSvoid
DISABLE_OCCLUSION_THIS_FRAME
This disables all occluders that cause the 'flickering' rendering under the map and inside buildings with no interiors, note that this may impact performance on lower end systems.
0x3669F1B198DCAA4F - GRAPHICSvoid
DISABLE_SCREENBLUR_FADE
Description not yet documented
0xDE81239437E8C5A8 - GRAPHICSvoid
_DISABLE_SCRIPT_AMBIENT_EFFECTS
Description not yet documented
0xEFD97FF47B745B8D - GRAPHICSvoid
DISABLE_VEHICLE_DISTANTLIGHTS
Description not yet documented
0xC9F98AC1884E73A2 - GRAPHICSBOOL
DOES_LATEST_BRIEF_STRING_EXIST
Used in pi_menu.c. Checks if there is a brief entry for specified value. Values: 0 - Dialogue brief 1 - Help text brief 2 - Mission Objective brief
0x5E657EF1099EDD65 - GRAPHICSBOOL
DOES_PARTICLE_FX_LOOPED_EXIST
Description not yet documented
0x74AFEF0D2E1E409B - GRAPHICSBOOL
DOES_VEHICLE_HAVE_CREW_EMBLEM
Description not yet documented
0x060D935D3981A275 - GRAPHICSvoid
DONT_RENDER_IN_GAME_UI
Description not yet documented
0x22A249A53034450A - GRAPHICSvoid
_DRAW_BINK_MOVIE
Must be called each frame, will play at specified position on screen when called with [`_PLAY_BINK_MOVIE`](#\_0x70D2CC8A542A973C)
0x7118E83EEB9F7238 - GRAPHICSvoid
DRAW_BOX
This native draws a box between two vectors in the game world. It is typically used for visualizing boundaries or areas of interest. The color of the box is specified by the red, green, and blue parameters, with alpha determining its opacity. This native should be called every frame for continuous rendering. ``` NativeDB Introduced: v323 ```
0xD3A9971CADAC7252 - GRAPHICSvoid
DRAW_DEBUG_BOX
``` NOTE: Debugging functions are not present in the retail version of the game. ```
0x083A2CA4F2E573BD - GRAPHICSvoid
DRAW_DEBUG_CROSS
``` NOTE: Debugging functions are not present in the retail version of the game. ```
0x73B1189623049839 - GRAPHICSvoid
DRAW_DEBUG_LINE
``` NOTE: Debugging functions are not present in the retail version of the game. ```
0x7FDFADE676AA3CB0 - GRAPHICSvoid
DRAW_DEBUG_LINE_WITH_TWO_COLOURS
``` NOTE: Debugging functions are not present in the retail version of the game. ```
0xD8B9A8AC5608FF94 - GRAPHICSvoid
DRAW_DEBUG_SPHERE
``` NOTE: Debugging functions are not present in the retail version of the game. ```
0xAAD68E1AB39DA632 - GRAPHICSvoid
DRAW_DEBUG_TEXT
``` NOTE: Debugging functions are not present in the retail version of the game. ```
0x3903E216620488E8 - GRAPHICSvoid
DRAW_DEBUG_TEXT_2D
``` NOTE: Debugging functions are not present in the retail version of the game. ```
0xA3BB2E9555C05A8F - GRAPHICSvoid
_DRAW_INTERACTIVE_SPRITE
Similar to [\_DRAW_SPRITE](#\_0xE7FFAE5EBF23D890), but seems to be some kind of "interactive" sprite, at least used by render targets. These seem to be the only dicts ever requested by this native: ``` prop_screen_biker_laptop Prop_Screen_GR_Disruption Prop_Screen_TaleOfUs prop_screen_nightclub Prop_Screen_IE_Adhawk prop_screen_sm_free_trade_shipping prop_screen_hacker_truck MPDesktop Prop_Screen_Nightclub And a few others ```
0x2BC54A8188768488 - GRAPHICSvoid
DRAW_LIGHT_WITH_RANGE
Description not yet documented
0xF2A1B2771A01DBD4 - GRAPHICSvoid
_DRAW_LIGHT_WITH_RANGE_AND_SHADOW
Description not yet documented
0xF49E9A9716A04595 - GRAPHICSvoid
DRAW_LINE
This native draws a line between two vectors in the game world. It is typically used for visualizing paths or connections between points. The color of the line is specified by the red, green, and blue parameters, with alpha determining its opacity. This native should be called every frame for continuous rendering. ``` NativeDB Introduced: v323 ```
0x6B7256074AE34680 - GRAPHICSvoid
DRAW_LOW_QUALITY_PHOTO_TO_PHONE
Description not yet documented
0x1072F115DAB0717E - GRAPHICSvoid
DRAW_MARKER
Draws a marker with the specified appearance at the target location. This has to be called every frame, e.g. in a `Wait(0)` loop. There's a [list of markers](https://docs.fivem.net/game-references/markers/) on the FiveM documentation site.
0x28477EC23D892089 - GRAPHICSvoid
_DRAW_MARKER_2
``` NativeDB Added Parameter 26: BOOL p25 ```
0xE82728F0DE75D13A - GRAPHICSvoid
DRAW_POLY
``` x/y/z - Location of a vertex (in world coords), presumably. ---------------- x1, y1, z1 : Coordinates for the first point x2, y2, z2 : Coordinates for the second point x3, y3, z3 : Coordinates for the third point r, g, b, alpha : Color with RGBA-Values Keep in mind that only one side of the drawn triangle is visible: It's the side, in which the vector-product of the vectors heads to: (b-a)x(c-a) Or (b-a)x(c-b). But be aware: The function seems to work somehow differently. I have trouble having them drawn in rotated orientation. Try it yourself and if you somehow succeed, please edit this and post your solution. I recommend using a predefined function to call this. [VB.NET] Public Sub DrawPoly(a As Vector3, b As Vector3, c As Vector3, col As Color) [Function].Call(Hash.DRAW_POLY, a.X, a.Y, a.Z, b.X, b.Y, b.Z, c.X, c.Y, c.Z, col.R, col.G, col.B, col.A) End Sub [C#] public void DrawPoly(Vector3 a, Vector3 b, Vector3 c, Color col) { Function.Call(Hash.DRAW_POLY, a.X, a.Y, a.Z, b.X, b.Y, b.Z, c.X, c.Y, c.Z, col.R, col.G, col.B, col.A); } BTW: Intersecting triangles are not supported: They overlap in the order they were called. ```
0xAC26716048436851 - GRAPHICSvoid
DRAW_RECT
``` Draws a rectangle on the screen. -x: The relative X point of the center of the rectangle. (0.0-1.0, 0.0 is the left edge of the screen, 1.0 is the right edge of the screen) -y: The relative Y point of the center of the rectangle. (0.0-1.0, 0.0 is the top edge of the screen, 1.0 is the bottom edge of the screen) -width: The relative width of the rectangle. (0.0-1.0, 1.0 means the whole screen width) -height: The relative height of the rectangle. (0.0-1.0, 1.0 means the whole screen height) -R: Red part of the color. (0-255) -G: Green part of the color. (0-255) -B: Blue part of the color. (0-255) -A: Alpha part of the color. (0-255, 0 means totally transparent, 255 means totally opaque) The total number of rectangles to be drawn in one frame is apparently limited to 399. ``` ``` NativeDB Added Parameter 9: BOOL p8 ```
0x3A618A217E5154F0 - GRAPHICSvoid
DRAW_SCALEFORM_MOVIE
Description not yet documented
0x54972ADAF0294A93 - GRAPHICSvoid
DRAW_SCALEFORM_MOVIE_3D
Description not yet documented
0x87D51D72255D4E78 - GRAPHICSvoid
DRAW_SCALEFORM_MOVIE_3D_SOLID
Description not yet documented
0x1CE592FDC749D6F5 - GRAPHICSvoid
DRAW_SCALEFORM_MOVIE_FULLSCREEN
``` unk is not used so no need ```
0x0DF606929C105BE1 - GRAPHICSvoid
DRAW_SCALEFORM_MOVIE_FULLSCREEN_MASKED
Description not yet documented
0xCF537FDE4FBD4CE5 - GRAPHICSBOOL
_DRAW_SHOWROOM
``` It's called after 0xD3A10FC7FD8D98CD and 0xF1CEA8A4198D8E9A p0 was always "CELEBRATION_WINNER" ```
0x98C4FE6EC34154CA - GRAPHICSvoid
_DRAW_SPHERE
Draws a 3D sphere, typically seen in the GTA:O freemode event "Penned In". Example:  ```lua DrawSphere(35.45, 172.66, 126.22, 1.0, 0, 0, 255, 0.2) ```
0x799017F9E3B10112 - GRAPHICSvoid
DRAW_SPOT_LIGHT
``` Parameters: * pos - coordinate where the spotlight is located * dir - the direction vector the spotlight should aim at from its current position * r,g,b - color of the spotlight * distance - the maximum distance the light can reach * brightness - the brightness of the light * roundness - "smoothness" of the circle edge * radius - the radius size of the spotlight * falloff - the falloff size of the light's edge Example in C# (spotlight aims at the closest vehicle): Vector3 myPos = Game.Player.Character.Position; Vehicle nearest = World.GetClosestVehicle(myPos , 1000f); Vector3 destinationCoords = nearest.Position; Vector3 dirVector = destinationCoords - myPos; dirVector.Normalize(); Function.Call(Hash.DRAW_SPOT_LIGHT, pos.X, pos.Y, pos.Z, dirVector.X, dirVector.Y, dirVector.Z, 255, 255, 255, 100.0f, 1f, 0.0f, 13.0f, 1f); ```
0xD0F64B265C8C8B33 - GRAPHICSvoid
_DRAW_SPOT_LIGHT_WITH_SHADOW
Description not yet documented
0x5BCA583A583194DB
A living reference. Documentation coverage varies by native and source.