Get Started

Calling Exports

Solar exports are namespaced with the SolarAC__ prefix and invoked the standard FiveM way. They all run server-side, so call them from a server script.

The basic shape

Use the resource name of your Solar install (default SolarAC). If you renamed the folder, use that name instead.

lua
-- server script
exports['SolarAC']:SolarAC__SomeExport(arg1, arg2)

Return values vs. callbacks

Most exports are synchronous and return their result directly. The ban queries are asynchronous (they reach the dashboard over HTTP) and hand their result to a callback.

lua
-- synchronous: returns immediately
local allowed = exports['SolarAC']:SolarAC__IsVehicleAllowed(`adder`)

-- asynchronous: result arrives in the callback
exports['SolarAC']:SolarAC__IsPlayerBanned(source, function(isBanned, banId)
  print(isBanned, banId)
end)

A real example

Whitelist a teleport right before you move a player, so the anticheat doesn't flag it:

lua
RegisterCommand('tpme', function(source)
  local ped = GetPlayerPed(source)
  -- open a short trust window FIRST, then perform the action
  exports['SolarAC']:SolarAC__WhitelistTeleport(source, 4000)
  SetEntityCoords(ped, 0.0, 0.0, 72.0, false, false, false, true)
end, false)
Why exports can't be abused: these are server exports. A client (and therefore a cheater executing code on the client) cannot call a server-side export — only your trusted server scripts can. The anticheat never exposes a client export that could disable detection or grant trust.
Make sure SolarAC is started before the resource that calls it (see Installation), otherwise the export won't be registered yet and you'll get an attempt to index a nil value error.