Skip to main content

Notifications

-- VortexAPI.AddNotification(text, timeout);
VortexAPI.AddNotification("Hello World!", 2000)

Utilities

-- returns the users redENGINE username
local username = VortexAPI.GetUsername()

WorldToScreen

If the position is invalid/off screenret will be false.
-- returns the screen pos of a world pos (vector3)
local ret, x, y = VortexAPI.WorldToScreen(coords)

Custom User Input

This allows the user to enter a custom string.
-- VortexAPI.OpenKeyboardInput(headerText, maxLength, callbackFunc)
VortexAPI.OpenKeyboardInput("Header", 20, function(enteredString)
	print(enteredString)
end)

Camera

**Sends a raycasts from the camera positions and will returns the following values: **hit, endCoords, entity .
local hit, endCoords, entity = VortexAPI.RaycastCamera()

local hit, endCoords, entity = VortexAPI.RaycastGameplayCamera()

Models

If timeoutisn’t set a default of 5000ms will be used.
-- will request a model and perform a basic validity check
local hasLoaded = VortexAPI.RequestModel(hash, timeout)

Network Control

Only works on servers that allow control requests on remotely owned entitys.
-- will request control of an entity
local gotControl = VortexAPI.RequestControl(entity, maxTrys)

Entity Spawning

This uses the menus internal entity spawning functions which include bypasses that might be unstable. These functions can be used to bypass anticheats but can also cause problems on a small amount of servers.
You can also pass the coords as a vector3 !
-- spawn object
local object = VortexAPI.CreateObject(modelHash, x, y, z)

-- spawn vehicle
local vehicle = VortexAPI.CreateVehicle(modelHash, x, y, z, heading)

-- spawn ped
local ped = VortexAPI.CreatePed(pedType, modelHash, x, y, z, heading)

Triggering Events

This feature can be unstable! If an invalid resource is used the event will not be triggered!
You can use resource and supply a custom resource that should be simulated when executing the trigger to bypass detection on some anticheats!This function uses Lua’s variadic arguments (...), allowing you to pass any number of parameters or just leave them away completely.
-- VortexAPI.TriggerEvent(resource, eventName, ...)
VortexAPI.TriggerEvent("esx_ambulancejob", "esx_ambulancejob:revive")

-- VortexAPI.TriggerServerEvent(resource, eventName, ...)
VortexAPI.TriggerEvent("example", "superSecretEvent", 123, "test", false)

Keys

Use the key indexes from the microsoft api.
-- checks if a key is pressed
VortexAPI.IsKeyPressed(virtualKeyIndex)

-- checks if a key was just pressed
VortexAPI.IsKeyJustPressed(virtualKeyIndex)