📄️ All
A list of all global functions that DSL provides, including their DSL version and a brief description.
📄️ -- progress
180 of 327 functions have been documented.
📄️ AddScriptLoaderCallback
This function is used to retrieve the function environment from native scripts and is typically utilized for hooking or replacing functions in there.
📄️ AllConfigStrings
Iterates over all values in a configuration object for a given key, parsing each value as a string.
📄️ AllConfigValues
Iterates over all values in a configuration object for a given key.
📄️ AllObjects
...
📄️ AllPeds
Returns an iterator function that will return each valid ped one at a time.
📄️ AllPlayers
...
📄️ AllSyncEntities
...
📄️ AllSyncEntityValues
...
📄️ AllSyncPeds
...
📄️ AllSyncPlayers
...
📄️ AllSyncVehicles
...
📄️ AllVehicles
...
📄️ AllowOnServer
Allow your script to keep running even when connected to a server.
📄️ CallFunctionFromScript
Call a function from a native script.
📄️ CameraGetRotation
Returns the current rotation angles of the camera in the game world.
📄️ CameraGetXYZ
Returns the current camera position and its look-at coordinates.
📄️ CameraIsWidescreen
...
📄️ CanWriteFiles
Check if files can be written.
📄️ ClearCommand
Unregister a `command` from the current script. Nothing will happen if the command is not registered with the script, and no error will be raised.
📄️ ClearDisplay
...
📄️ CloseFile
Close a file.
📄️ ConnectToServer
...
📄️ CopyTimecycle
Copies an existing timecycle object.
📄️ CreateAdvancedThread
Create an advanced thread using the specified type and function.
📄️ CreateDrawingThread
Create a drawing thread using the specified function or an anonymous function.
📄️ CreateFolder
...
📄️ CreateFont
Creates a font object from a file.
📄️ CreateRenderTarget
...
📄️ CreateSyncDimension
...
📄️ CreateSyncEntity
...
📄️ CreateSyncPed
...
📄️ CreateSyncVehicle
...
📄️ CreateSystemThread
Create a system thread using the specified function or an anonymous function.
📄️ CreateTexture
Create a `texture` for later drawing given a relative path of a `.png` file.
📄️ CreateThread
Starts a new thread using the specified function or an anonymous function.
📄️ CreateTimecycle
...
📄️ DeleteSyncDimension
...
📄️ DeleteSyncEntity
...
📄️ DidPlayerUseLauncher
...
📄️ DiscardText
Discards the current text formatting, resetting all text formatting settings to their default values.
📄️ DisconnectFromServer
...
📄️ DoesCommandExist
Check if a `command` exists.
📄️ DontAutoStartScript
Stop execution of your script and shut it down if it was started automatically.
📄️ DrawBackBufferOntoTarget
...
📄️ DrawRectangle
Draws a rectangle on the screen.
📄️ DrawText
Draws text on the screen.
📄️ DrawTextInline
Draws text on the screen in a specified style for a given duration.
📄️ DrawTexture
Draws a texture on the screen.
📄️ DrawTexture2
...
📄️ FindFile
...
📄️ FindFiles
Searches for files matching the given name.
📄️ FlushFile
Flush writing operations.
📄️ ForceActionNode
...
📄️ ForceFacialNode
...
📄️ ForceTaskNode
...
📄️ ForceWindowUpdate
...
📄️ GetAllPoolInfo
Returns a table containing more tables with info about each individual pool.
📄️ GetAnyKeyBeingPressed
Check if any keyboard key was just pressed.
📄️ GetAnyKeyBeingReleased
Check if any keyboard key was just released.
📄️ GetAnyKeyPressed
Check if any keyboard key is currently pressed.
📄️ GetBaseGameFunction
Get the original version of a C function registered by Rockstar.
📄️ GetConfigBoolean
Get a boolean value from a configuration object.
📄️ GetConfigNumber
Get the number associated with a key in a config.
📄️ GetConfigString
Return the value associated with `key` as a string.
📄️ GetConfigStrings
...
📄️ GetConfigValue
Return the raw value associated with `key` as a string.
📄️ GetControllerPed
...
📄️ GetCurrentScript
Returns the current `script`.
📄️ GetDisplayAspectRatio
Return the current display aspect ratio.
📄️ GetDisplayResolution
Get the current display resolution used by DSL's renderer.
📄️ GetExtraTimecycle
...
📄️ GetFrameCount
...
📄️ GetFrameTime
Gets the time elapsed since the last frame in seconds, useful for frame rate independent movement and animations.
📄️ GetHash
Returns light userdata representing the hashed string, but is case-sensitive.
📄️ GetHudTexture
...
📄️ GetInputHardware
Returns what hardware a certain input is bound to.
📄️ GetInternalResolution
Get the game's current internal resolution.
📄️ GetKeyCode
...
📄️ GetLocalizedText
Return the localized `text` associated with a certain `label`.
📄️ GetMouseInput
Returns direct mouse input.
📄️ GetMouseScroll
Returns the scroll wheel value for the mouse.
📄️ GetNodeFromData
...
📄️ GetPackageFilePath
Get the path of a file located in DSL's packages folder.
📄️ GetPersistentDataTable
Returns a persistent data table for the current collection.
📄️ GetPhysicsMult
...
📄️ GetPlayerIp
...
📄️ GetPlayerName
Returns the local player's username from their configuration.
📄️ GetPoolSize
Return the maximum number of elements allowed in a pool.
📄️ GetPoolSpace
Returns the amount of space left in a pool (the size minus the usage).
📄️ GetPoolUsage
Return the number of elements currently used in a pool.
📄️ GetRawPersistentDataTable
...
📄️ GetRawSaveDataTable
Get the raw save data table.
📄️ GetSaveDataTable
Get a save data table by its ID.
📄️ GetScreenCoords
Convert world coordinates to screen coordinates.
📄️ GetScreenResolution
Get the size of the primary monitor.
📄️ GetScriptCollection
Get script collection's name.
📄️ GetScriptConfig
Returns the `config` object belonging to the current collection.
📄️ GetScriptEnvironment
Get the script's environment.
📄️ GetScriptFilePath
Get a full path given a relative path.
📄️ GetScriptName
Get the script's name.
📄️ GetScriptNetworkTable
Returns a table that is available to all scripts in the current collection.
📄️ GetScriptSharedTable
Returns a table that is available to all scripts in the current collection.
📄️ GetServerHz
...
📄️ GetServerList
...
📄️ GetSimulationSpeed
Return the game's simulation speed.
📄️ GetString
...
📄️ GetSyncActiveDimension
...
📄️ GetSyncDimensionName
...
📄️ GetSyncDimensionSpace
...
📄️ GetSyncEntityArea
...
📄️ GetSyncEntityDimension
...
📄️ GetSyncEntityFromId
...
📄️ GetSyncEntityId
...
📄️ GetSyncEntityModel
...
📄️ GetSyncEntityOwner
...
📄️ GetSyncEntityPed
...
📄️ GetSyncEntityPos
...
📄️ GetSyncEntitySpace
...
📄️ GetSyncEntityVehicle
...
📄️ GetSyncMainDimension
...
📄️ GetSyncPedVehicle
...
📄️ GetSyncPlayerFromPed
...
📄️ GetSyncPlayerPed
...
📄️ GetSyncVehiclePassenger
...
📄️ GetSystemTimer
Returns the value of GetTickCount, primarily intended for use with math.randomseed to improve the random number generator.
📄️ GetTextFormatting
Get current text formatting table.
📄️ GetTextureAspectRatio
Get the aspect ratio of a texture.
📄️ GetTextureDisplayAspectRatio
Get the ratio that should be used to draw a texture without affecting its aspect ratio.
📄️ GetTextureResolution
Get the resolution of a texture.
📄️ GetThreadName
Get the name of a thread.
📄️ GetThreadWait
Returns the time until a thread will be allowed to update again.
📄️ GetTimecycle
Gets timecycle object.
📄️ GetTimer
Returns how long the server has been running in milliseconds.
📄️ GetTypingString
Returns the string being typed.
📄️ GetVolumeSetting
...
📄️ HookFunction
Register a new function hook.
📄️ ImportScript
Import a script from Scripts.img into the current script's environment.
📄️ IsActionNodeValid
This function was added in DSL 4.
📄️ IsConfigMissing
Check if a config file is missing.
📄️ IsConsoleActive
Checks if the console is currently opened.
📄️ IsDslScriptRunning
Check if a DSL script is currently running.
📄️ IsGamePaused
Checks if the game is... *paused*.
📄️ IsHash
Check if a hash is equal to a number represented by a string.
📄️ IsKeyBeingPressed
Check if a keyboard key was just pressed this frame.
📄️ IsKeyBeingReleased
Check if a keyboard key was just released.
📄️ IsKeyPressed
Check if a keyboard key is currently pressed.
📄️ IsKeyValid
Check if a keyboard key is valid.
📄️ IsMouseBeingPressed
Check if a mouse button was just pressed.
📄️ IsMouseBeingReleased
Check if a mouse button was just released.
📄️ IsMousePressed
Check if a mouse button is currently pressed.
📄️ IsNetworkingAllowed
Check if networking is allowed in the user's DSL config.
📄️ IsPlayerValid
...
📄️ IsSaveDataReady
Check if custom save data is ready.
📄️ IsScriptRunning
Check if `script` is running.
📄️ IsScriptZipped
Check if a script is zipped.
📄️ IsSyncActive
...
📄️ IsSyncDimensionValid
...
📄️ IsSyncEntityOwned
...
📄️ IsSyncEntityReady
...
📄️ IsSyncEntityValid
...
📄️ IsSyncPedValid
...
📄️ IsSyncVehicleValid
...
📄️ IsSystemAccessAllowed
Check if system access is unrestricted.
📄️ IsThreadRunning
Check if a thread is running.
📄️ IsTypingActive
Returns if typing is currently active.
📄️ IsUsingJoystick
Returns if the controller is an xbox controller.
📄️ KickPlayer
...
📄️ LoadConfigFile
Load a config file.
📄️ LoadScript
Load a *DSL* script into the current script's environment.
📄️ LoadTable
Load a table from a file.
📄️ LockSyncEntityOwner
...
📄️ MeasureText
Returns the normalized width and height of what a text draw would be without actually drawing it.
📄️ MeasureTextInline
...
📄️ ObjectFaceHeading
...
📄️ ObjectGetEntityFlag
...
📄️ ObjectGetHeading
...
📄️ ObjectGetModelId
...
📄️ ObjectGetPosXYZ
...
📄️ ObjectGetRotation
...
📄️ ObjectIsValid
...
📄️ ObjectNameToHashID
Returns light userdata representing the hashed string.
📄️ ObjectSetEntityFlag
...
📄️ ObjectSetPosXYZ
...
📄️ ObjectSetRotation
...
📄️ OpenFile
Open a file given a relative path.
📄️ PackData
Serialize values into a single string.
📄️ PackTable
Serialize a table into a string.
📄️ PedCanEnterVehicle
...
📄️ PedCreateScriptless
Creates a ped without attaching it to the current script.
📄️ PedGetActionNode
This function was added in DSL 10
📄️ PedGetActionNodeData
...
📄️ PedGetActionTree
...
📄️ PedGetControllerID
...
📄️ PedGetFacialNode
...
📄️ PedGetFacialNodeData
...
📄️ PedGetModelId
Gets the model ID of a given ped.
📄️ PedGetPointer
...
📄️ PedGetPunishmentPoints
...
📄️ PedGetSyncEntity
...
📄️ PedGetTaskNode
...
📄️ PedGetTaskNodeData
...
📄️ PedGetThrottle
Get a ped's current throttle value.
📄️ PedIsDoingFacial
...
📄️ PedMeDoingFacial
...
📄️ PedMeDoingTask
...
📄️ PedSetActionNodeSimple
...
📄️ PedSetFacialNodeSimple
...
📄️ PedSetPosSimple
Moves a ped without moving the player.
📄️ PedSetTaskNodeSimple
...
📄️ PedSetThrottle
Set a ped's current throttle value.
📄️ PedSpoofModel
Sets a ped's model index without actually changing the ped's model.
📄️ PlayerHasControl
Checks whether the player currently has control over the active ped.
📄️ PopTextFormatting
...
📄️ PrintError
Print output to the console as error text.
📄️ PrintOutput
Print output to the console.
📄️ PrintSpecial
Print output to the console as special text.
📄️ PrintWarning
Print output to the console as warning text.
📄️ QuitGame
Instantly exit the game's process.
📄️ QuitServer
Signal the server to gracefully shutdown as soon as possible.
📄️ ReadFile
Read bytes from a file.
📄️ RegisterFunction
...
📄️ RegisterGameFile
Registers a file for replacement in the game archives.
📄️ RegisterLocalEventHandler
Registers a new local event handler.
📄️ RegisterLocalizedText
Register a localized text entry with a custom label and length.
📄️ RegisterNetworkEventHandler
Registers a new network event handler.
📄️ RemoveEventHandler
Remove an event handler created with `RegisterLocalEventHandler`.
📄️ RemoveFunctionHook
Remove a function hook.
📄️ ReplaceCode
...
📄️ ReplaceFunction
Replace a base game C function with a given replacement function.
📄️ ReplaceLocalizedText
Replace localized text with new text.
📄️ RequestServerListing
...
📄️ RequireDependency
Ensure that a specific collection is running before executing the script.
📄️ RequireLoaderVersion
Ensure that the current version of DSL is at least a specific version.
📄️ RequirePoolSize
Makes sure a pool is at least a certain size.
📄️ RequireSync
...
📄️ RequireSystemAccess
Ensure that system access is enabled.
📄️ RestoreTimecycles
Resets all timecycles to their original default state.
📄️ RunCommand
Process a command line string as if it was typed into the console.
📄️ RunLocalEvent
Run a local event with the given type and arguments.
📄️ SavePersistentDataTables
...
📄️ SaveTable
Save a table to a file.
📄️ SeasonGet
Gets the current season.
📄️ SeekFile
Seek a file like ANSI C.
📄️ SendNetworkEvent
...
📄️ SetAllTimecycles
Sets timecycle object to all the available timecycles.
📄️ SetButtonPressed
Set a button as pressed.
📄️ SetCommand
Set a command with a callback function in the current DSL script.
📄️ SetDrawLayer
Set the current drawing layer used by cached draws.
📄️ SetExtraTimecycle
...
📄️ SetHelpText
...
📄️ SetMinigameActive
...
📄️ SetMissionActive
This function was added in DSL 10.
📄️ SetRendererAlphaBlending
...
📄️ SetSimulationSpeed
...
📄️ SetStickValue
Set a stick's value.
📄️ SetStoryDisabled
...
📄️ SetString
...
📄️ SetSyncActiveDimension
...
📄️ SetSyncEntityDimension
...
📄️ SetSyncEntityModel
...
📄️ SetSyncEntityPos
...
📄️ SetSyncPedVehicle
...
📄️ SetSyncPlayerPed
...
📄️ SetTextAlign
Sets the horizontal and vertical alignment for text drawing.
📄️ SetTextBlack
...
📄️ SetTextBold
Enables bold formatting for subsequent text drawing operations.
📄️ SetTextClipping
Sets text clipping boundaries to limit text display area.
📄️ SetTextColor
Sets the color and alpha transparency for text drawing.
📄️ SetTextColour
...
📄️ SetTextFont
Sets the font to use for subsequent text drawing operations.
📄️ SetTextFormatting
Restores previously saved text formatting settings.
📄️ SetTextHeight
Sets the size of text.
📄️ SetTextItalic
Enables italic formatting for subsequent text drawing operations.
📄️ SetTextOutline
Adds an outline effect around text.
📄️ SetTextPosition
Sets the position for the text.
📄️ SetTextRedrawing
...
📄️ SetTextScale
Sets the text size using a scale multiplier based on a predefined normal size.
📄️ SetTextShadow
Adds a drop shadow effect to text.
📄️ SetTextWrapping
Enables word wrapping for text drawing within a specified width.
📄️ SetTextureBounds
...
📄️ SetTimecycle
Sets timecycle object to a specific time, season, and weather condition.
📄️ SetVolumeSetting
...
📄️ SoundPlayAmbientSpeechEventSpecific
...
📄️ StartScript
Start a *DSL* script and add it to the current collection.
📄️ StartTyping
Start allowing keyboard input that can be retrieved using `GetTypingString`.
📄️ StartVirtualScript
Start a *DSL* virtual script and add it to the current collection.
📄️ StopCurrentScriptCollection
Stop the current script collection.
📄️ StopTyping
Abort typing.
📄️ TerminateCurrentScript
Terminate the current script.
📄️ TerminateCurrentThread
Terminate the current thread.
📄️ TerminateScript
Shutdown `script`, or the current script if not given.
📄️ TerminateThread
Terminate a thread or the current thread.
📄️ UnlockSyncEntityOwner
...
📄️ UnpackData
Unpack values previously packed with `PackData`.
📄️ UnpackTable
Unpacks a table previously packed using `PackTable`.
📄️ UseBaseGameScriptFunctions
Use base game script functions.
📄️ UseProxyScriptForFunction
Creates a function in the calling environment that will use `CallFunctionFromScript` to call the function given.
📄️ VehicleGetColor
...
📄️ VehicleGetColours
...
📄️ VehicleGetPassenger
This function was added in DSL 10.
📄️ VehicleGetPointer
...
📄️ VehicleGetRotation
...
📄️ VehicleGetStatus
...
📄️ VehicleGetSyncEntity
...
📄️ VehicleSetPosSimple
...
📄️ VehicleSetRotation
...
📄️ VehicleUseHorn
This function was added in DSL 10.
📄️ Wait
Wait for a specified amount of time.
📄️ WasSyncEntityUpdated
...
📄️ WasTypingAborted
Checks if the typing was aborted.
📄️ WeatherGetNext
...
📄️ WeatherGetNow
...
📄️ WeatherGetTransition
...
📄️ WeatherTransition
...
📄️ WriteFile
Write data to a file.
📄️ ZeroController
Zero all the input memory on a controller.
📄️ double
...
📄️ float
...
📄️ int16
...
📄️ int32
...
📄️ int8
...
Print output to the console.
📄️ ptr
...
📄️ type2
This function was added in DSL 10.
📄️ uint16
...
📄️ uint32
...
📄️ uint8
...