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

                                  Scripting Introduction

                                  • Introduction to resources
                                  • Creating your first script in Lua
                                  • Creating your first script in C#
                                  • Creating your first script in JavaScript
                                  • About native functions
                                  Privacy
                                  •
                                  Cookie Policy
                                  •
                                  Cookie Settings