Skip to content
GAMPEONCreate
New project
Preview: this works today, but details can still change.

Coming from FiveM

If you have written FiveM resources, most of what you know still applies. GAMPEON uses Lua 5.4, the same resource format and the same event, thread and export model. What it does not have is GTA V: there are no GTA natives, no GTA assets and no GTA map.

FiveM GAMPEON
fxmanifest.lua, __resource.lua Read directly. See Manifest.
AddEventHandler, RegisterNetEvent, TriggerEvent, TriggerServerEvent, TriggerClientEvent Same names, same behaviour. source is set in network events.
CreateThread, Wait, SetTimeout, Citizen.* Same.
exports('name', fn), exports.res:fn() Same. Values are copied, functions are passed as references and may Wait. See Exports.
json.encode, json.decode, GetGameTimer, GetCurrentResourceName, IsDuplicityVersion Same.
onResourceStart, onResourceStop Same.
RegisterCommand, ExecuteCommand, GetConvar*, SetConvar*, ACE permissions Same. See Commands and convars.
PerformHttpRequest Same, private addresses are blocked. See HTTP requests.
vector2, vector3, vector4, promise, Citizen.Await Same.
LoadResourceFile, SaveResourceFile, GetResourceMetadata, GetInvokingResource Same.
oxmysql, mysql-async (MySQL.*) Built in. See Database.
server.cfg with ensure, exec, set/setr/sets, add_ace, add_principal Same. See Commands and convars.
clientkick, bans from txAdmin clientkick is the same. ban, unban and banlist are built into the server. See Kick and ban.
playerJoining, playerDropped, GetPlayers, GetPlayerName, GetPlayerIdentifiers, DropPlayer Same. Identifiers are gampeon: and license:. See Players.
client_script, files, download on join, PlayerId, GetPlayerServerId Same. Only from trusted servers for now. See Client scripts.
chat resource: chat:addMessage, chatMessage, chat:addSuggestion, CancelEvent Same events, built in. Plain text only, no HTML or colour codes. See Text chat.
ui_page, SendNUIMessage, RegisterNUICallback, SetNuiFocus, fetch('https://<resource>/…') Same. Shown over the game on test servers and in gampeon-server. See Web interfaces.
GetPlayerPed, PlayerPedId, GetEntityCoords, GetEntityHeading, SetEntityCoords, DoesEntityExist Same names, meters like in FiveM. Heading follows the Unreal editor (0 faces +x, 90 faces +y), so values copy 1:1 from a map’s rotation. For “in front of the player” math use GetEntityForwardVector instead of GTA heading formulas. Moving is server only. See World and entities.
CreateObject, DeleteEntity, FreezeEntityPosition, GetHashKey, GetEntityModel, IsModelValid Same arguments, server only for now. GAMPEON has its own models (prop_cube and more), GTA model names return 0 with a hint in the log. Objects disappear when their resource stops. See Objects.
  • No GTA natives. GAMPEON has its own game API. Where it does the same as FiveM, it uses the FiveM name: the player functions and World and entities (GetPlayerPed, GetEntityCoords, SetEntityCoords, CreateObject and a few more). DrawMarker and most other natives do not exist, and GTA models are not there: CreateObject takes GAMPEON models, CreateVehicle has none yet. Only the functions in the Lua API reference exist.
  • Positions are in meters, headings follow Unreal. GetEntityCoords returns meters like in FiveM, but GAMPEON maps are not GTA maps, so coordinates do not carry over. A heading of 0 faces +x and 90 faces +y.
  • Stricter sandbox. No io, os.execute, debug, package, require, dofile or bytecode. Every resource has its own memory and CPU limit. See Sandbox.
  • Network events must be registered. A handler only receives an event from the other side if its resource called RegisterNetEvent for that name. This is FiveM’s recommended practice; GAMPEON enforces it.
  • Functions do not cross the network. Between resources on the same side they work like in FiveM. A received function is a normal Lua function (type(cb) == 'function'), not a table.
  • Your own assets. GTA models, maps, sounds and textures cannot be used. Neither can assets ripped from other games. See Third-party assets.

ESX, QBCore, Qbox and ox_lib depend heavily on GTA natives, so they do not run unchanged. Instead, the RP Starter gives your resources what they expect from ESX and QBCore: getSharedObject, GetCoreObject, xPlayer, Player.Functions, callbacks, usable items and the usual events, on top of its own characters, money, jobs and inventory. Database calls work anyway, because MySQL.* is built in like oxmysql. Code that uses GTA natives still needs porting.

gampeon-server runs your server resources from the console, with fake players that join, send events and type commands.

The porting check reads your server’s resources and tells you, per resource, what works already and what needs replacing.

Ask your assistant to “port this FiveM resource to GAMPEON”. With the MCP server connected, it uses the port_fivem_resource prompt, knows which functions exist and marks everything it cannot port. See Example prompts.

Report a problem with this pageOther ways to give feedback