DocumentationNative Reference
API Set:
  • all
  • server
  • client
Language:
  • raw
  • lua
  • c#
  • js
  • Home
  • Getting Started
  • Getting Started
    • Prerequisites
    • Installing FiveM
    • Setting up a FiveM Server
    • Creating Scripts
  • Client Manual
    • Where to Buy GTAV
    • Where to Buy Red Dead Redemption 2
    • System Requirements
    • Installing FiveM
    • Console Commands
    • Crosshair Commands
    • CitizenFX.ini
    • FiveM Shortcut
    • Enabling Full Client Dumps
    • Running two FiveM clients
  • Server Manual
    • Setting Up a Server
    • Setting Up a Server Using a Game Server Hosting Provider
    • Setting up a server using txAdmin
    • Setting Up a Vanilla FXServer
    • Server Commands
    • Proxy Setup
    • Asset Escrow
    • Setting Up a Tebex Store
    • Featured Server List
    • Finding Resources
    • Onboarding Guide FiveM for GTAV Enhanced
    • End of Support/End of Life Warning Message
    • Frameworks
    • Static IPs
  • Server Download
  • Guides
  • Guides for 3D Assets
    • Part 1 - Tooling & Workspace Setup
    • Part 2 - Exploring & Exporting GTAV Assets
    • Part 3 - Creating GTAV Assets in Blender
    • Part 4 - Placing Assets & Creating Simple Map Mods
    • Part 5 - Collision Editing and Creation
    • Part 6 - LODs (Level of Detail)
    • Part 7 - Map Animation Creation
    • Part 8 - Door Creation
  • Guides for Scripting
    • Scripting Introduction
      • Introduction to Resources
      • Creating Your First Script in Lua
      • Creating your first script in JavaScript
      • Creating Your First Script in C#
      • Understanding and Using Native Functions
      • Fact Sheet
    • Scripting Runtimes
      • Scripting in Lua
      • Scripting in JavaScript
      • Scripting in C#
    • Debugging
      • Using the Profiler
    • Networking
      • Network and Local IDs
      • State Bags
    • Working with Events
      • Listening for Events
      • Canceling Events
      • Triggering Events
    • User Interfaces with NUI
      • Fullscreen NUI
      • NUI Callbacks
      • Loading Screens
        • Direct-Rendered UI
      • Voice
        • Using Scaleform
          • Migrating from Deprecated Methods
            • Creating Chat Messages
            • Creating Commands
          • Migrating from Other GTAV Multiplayer Platforms
            • Using New Game Features
              • Work with Drawable Components and Props Using Collections
              • Fuel Consumption
          • References
          • Scripting Reference
            • Client Functions
              • Server Functions
                • Resource Manifest
                  • Runtime-Specific References
                    • Lua Function Reference
                      • Client-Side Functions in Lua
                      • Server-Side Functions in Lua
                    • JavaScript function reference
                      • Client-side functions in JavaScript
                      • Server-side functions in JavaScript
                    • C# Function Reference
                      • Client-Side Functions in C#
                      • Server-Side Functions in C#
                  • Events
                    • Client Events
                      • Server Events
                        • List of Events
                          • gameEventTriggered
                          • onClientResourceStart
                          • onClientResourceStop
                          • onEntityBucketChange
                          • onPlayerBucketChange
                          • onResourceStart
                          • onResourceStarting
                          • onResourceStop
                          • playerConnecting
                          • playerDropped
                          • populationPedCreating
                          • rconCommand
                          • respawnPlayerPedEvent
                          • vehicleComponentControlEvent
                      • Convars
                        • OneSync
                        • Game References
                          • Blips
                          • Checkpoints
                          • Controls
                          • Data Files
                          • Game Events
                          • Gamer Tags
                          • HUD Colors
                          • Input mapper/parameter IDs
                            • DIGITALBUTTON_AXIS
                            • GAME_CONTROLLED
                            • JOYSTICK_AXIS
                            • JOYSTICK_AXIS_NEGATIVE
                            • JOYSTICK_AXIS_POSITIVE
                            • JOYSTICK_BUTTON
                            • JOYSTICK_IAXIS
                            • JOYSTICK_POV
                            • JOYSTICK_POV_AXIS
                            • KEYBOARD
                            • MKB_AXIS
                            • MOUSE_ABSOLUTEAXIS
                            • MOUSE_BUTTON
                            • MOUSE_BUTTONANY
                            • MOUSE_CENTEREDAXIS
                            • MOUSE_NORMALIZED
                            • MOUSE_RELATIVEAXIS
                            • MOUSE_SCALEDAXIS
                            • MOUSE_WHEEL
                            • PAD_ANALOGBUTTON
                            • PAD_AXIS
                            • PAD_DEBUGBUTTON
                            • PAD_DIGITALBUTTON
                            • PAD_DIGITALBUTTONANY
                            • TOUCHPAD_ABSOLUTE_AXIS
                            • TOUCHPAD_CENTERED_AXIS
                          • Instructional Buttons
                          • Markers
                          • Net Game Events
                          • Ped Models
                          • Pickup Hashes
                          • Profile Settings
                          • Radio Stations
                          • Speeches
                          • Text Formatting
                          • Vehicle References
                            • Vehicle Models
                            • Vehicle Colors
                            • Vehicle Flags
                          • Weapon Models
                          • Zones
                        • Stock Resources
                          • baseevents
                            • chat
                              • Events
                                • chat:addMessage
                                • chat:addSuggestion
                                • chat:addSuggestions
                                • chat:addTemplate
                                • chat:clear
                                • chat:removeSuggestion
                                • chatMessage
                              • Exports
                                • addMessage (client)
                                • addMessage (server)
                                • addSuggestion
                                • registerMessageHook
                                • registerMode
                            • mapmanager
                              • sessionmanager
                                • spawnmanager
                                  • txAdmin
                                    • Permissions
                                • Products
                                • Alchemist
                                  • FxDK
                                    • Resources
                                    • World Editor
                                    • Project Building
                                    • FXCode
                                  • Support
                                  • Developer Docs
                                    • Sandbox
                                    • Script Runtimes
                                    • Secure Your Events
                                    • What's Changed in FiveM for GTAV Enhanced
                                  • Support
                                    • Client Issues
                                    • Server Issues
                                    • Resource FAQ
                                    • Server Debugging
                                    • Requesting Documentation
                                  • Contributing
                                    • Contribution Guidelines
                                    • Git
                                      • Rebase Guide
                                      • Squash Guide
                                  • Archive
                                  • Cookbook Archive
                                    • Marking a Vehicle as 'player vehicle' for Game Code
                                    • Making a Console Key Bind Wait Between Commands
                                    • Quick note on using built-in ACL/security
                                    • Using modified scenario files on FiveM
                                    • FYI: FiveM and RedM support raw .ymap/.ytyp files
                                    • Routing Buckets: Split Game State
                                    • CitizenFX C# templates are fixed
                                    • A quick note about OneSync server-side persistence
                                    • Try the new CitizenFX C# templates for FiveM
                                    • Uploading photos from in-game to the Cfx.re Gallery
                                    • Using the New Console Key Bindings
                                    • Optimizing Resource Downloads Using a Caching Proxy
                                    • OneSync: intercepting game events (such as explosions)
                                    • ANCIENT INFO] Two new experimental OneSync variables
                                    • Useful Snippet: Getting the Top Left of the Minimap in Screen Coordinates
                                    • Improving Script Stack Traces
                                    • GET_ACTIVE_PLAYERS: the replacement for player loops
                                    • Adaptive Cards in Deferrals
                                    • Lua Support for Compile-Time Jenkins Hashes
                                    • Our Work on Supporting Emoji in Scaleform GFx

                                  Cookbook Archive

                                  Cookbook Archive

                                  This section contains articles preserved from the discontinued Cookbook blog. All content is provided in its original form. Newer information may exist.

                                  2022

                                  • 2022-01-06 - Marking a vehicle as 'player vehicle' for game code

                                  2021

                                  • 2021-12-21 - Making a console key bind wait between commands
                                  • 2021-07-17 - Quick note on using built-in ACL/security
                                  • 2021-04-13 - Using modified scenario files on FiveM
                                  • 2021-04-09 - FYI: FiveM and RedM support raw .ymap/.ytyp files

                                  2020

                                  • 2020-11-28 - Routing buckets: split game state
                                  • 2020-08-25 - CitizenFX C# templates are fixed
                                  • 2020-07-10 - A quick note about OneSync server-side persistence
                                  • 2020-02-24 - Try the new CitizenFX C# templates for FiveM
                                  • 2020-01-20 - Uploading photos from in-game to the Cfx.re Gallery
                                  • 2020-01-06 - Using the new console key bindings

                                  2019

                                  • 2019-10-29 - Optimizing resource downloads using a caching proxy
                                  • 2019-08-19 - OneSync: intercepting game events (such as explosions)
                                  • 2019-08-12 - [ANCIENT INFO] Two new experimental OneSync variables
                                  • 2019-08-12 - Useful snippet: getting the top left of the minimap in screen coordinates
                                  • 2019-07-15 - Improving script stack traces
                                  • 2019-06-29 - GET_ACTIVE_PLAYERS: the replacement for player loops
                                  • 2019-06-29 - Adaptive Cards in deferrals
                                  • 2019-06-23 - Lua support for compile-time Jenkins hashes
                                  • 2019-06-09 - Our work on supporting emoji in Scaleform GFx
                                  Privacy
                                  •
                                  Cookie Policy
                                  •
                                  Cookie Settings
                                  • 2022
                                  • 2021
                                  • 2020
                                  • 2019