Exports & Events
Full reference for all client and server exports, events and NUI callbacks exposed by QuanticPhone.
Client exports
Call these from client-side scripts using exports.quanticPhone:ExportName().
HasPhoneOpened() → booleanClientReturns true if the phone UI is currently visible.
if exports.quanticPhone:HasPhoneOpened() then
print("Phone is open")
endGetBatteryLevel() → numberClientReturns the local player's current battery level (0–100).
local level = exports.quanticPhone:GetBatteryLevel()
print("Battery:", level .. "%")SetBatteryLevel(level)ClientSets the local player's battery level. Pass 0–100.
exports.quanticPhone:SetBatteryLevel(100) -- fully chargeSetCharging(status)ClientMarks the phone as charging (true) or not charging (false).
exports.quanticPhone:SetCharging(true) -- start charging
exports.quanticPhone:SetCharging(false) -- stop chargingAddCustomApp(data)ClientRegisters a custom app into the phone home screen. See Custom apps guide.
exports.quanticPhone:AddCustomApp({
id = "my-app",
name = "My App",
icon = "nui://my-app/web/icon.png",
ui = "nui://my-app/web/index.html",
})AddKeyBind(keyBind)ClientRegisters a custom keybind for use within the phone context.
exports.quanticPhone:AddKeyBind({
key = "F5",
label = "Open my app",
action = function() -- callback end,
})UsePhoneItem(_, slot)ClientManually triggers the phone-use logic for a specific inventory slot (ox_inventory integration).
exports.quanticPhone:UsePhoneItem(nil, slotId)RegisterClientCallback(event, handler)ClientRegisters a client-side callback handler.
exports.quanticPhone:RegisterClientCallback("myEvent", function(data, cb)
cb({ ok = true })
end)TriggerCallback(event, cb, ...)ClientCalls a server-side callback from the client.
exports.quanticPhone:TriggerCallback("getPlayerData", function(data)
print(data.name)
end)AwaitCallback(event, ...) → anyClientAsync/await version of TriggerCallback.
local data = exports.quanticPhone:AwaitCallback("getPlayerData")
print(data.name)Server exports
Call these from server-side scripts using exports.quanticPhone:ExportName().
GetBattery(source) → numberServerReturns a player's current battery level.
local level = exports.quanticPhone:GetBattery(source)
print("Battery:", level)SetBattery(source, level)ServerSets a player's battery level (0–100).
exports.quanticPhone:SetBattery(source, 50)GetSignalTowers() → tableServerReturns all registered signal towers.
local towers = exports.quanticPhone:GetSignalTowers()CreateSignalTower(id, data)ServerAdds a new signal tower at runtime.
exports.quanticPhone:CreateSignalTower("my_tower", {
coords = vector3(100.0, 200.0, 30.0),
range = 1500,
signal = 80,
type = "4G",
})RemoveSignalTower(id)ServerRemoves a signal tower by ID.
exports.quanticPhone:RemoveSignalTower("my_tower")GetWifiPoints() → tableServerReturns all registered WiFi hotspots.
local points = exports.quanticPhone:GetWifiPoints()CreateWifiPoint(id, data)ServerAdds a WiFi hotspot at runtime.
exports.quanticPhone:CreateWifiPoint("cafe_wifi", {
label = "CafeWifi",
coords = vector2(200.0, -800.0),
range = 15.0,
password = "coffee123",
})RemoveWifiPoint(id)ServerRemoves a WiFi hotspot by ID.
exports.quanticPhone:RemoveWifiPoint("cafe_wifi")GetEmailAddress(phoneNumber) → stringServerReturns the email address for a given phone number.
local email = exports.quanticPhone:GetEmailAddress("5511999990000")
print(email)SendMail(data)ServerSends an email to a player's phone inbox.
exports.quanticPhone:SendMail({
phoneNumber = "5511999990000",
subject = "Welcome!",
body = "Thanks for joining.",
sender = "Admin",
})FilterMessage(text) → boolean, stringServerChecks if a message contains blacklisted words. Returns filtered status and cleaned text.
local clean, filtered = exports.quanticPhone:FilterMessage(text)
if filtered then TriggerClientEvent("chat:addMessage", src, {args={"Blocked"}}) endIsURLAllowed(url) → booleanServerChecks if a URL is on the browser whitelist.
local ok = exports.quanticPhone:IsURLAllowed("https://youtube.com")IsUploadDomainAllowed(domain) → booleanServerChecks if a domain is authorized for media uploads.
local ok = exports.quanticPhone:IsUploadDomainAllowed("cdn.fivemanage.com")SetPublicPhoneSystemEnabled(enabled)ServerEnable or disable public phone booths at runtime.
exports.quanticPhone:SetPublicPhoneSystemEnabled(false)GetPublicPhoneSystemEnabled() → booleanServerReturns whether public phones are currently active.
local active = exports.quanticPhone:GetPublicPhoneSystemEnabled()RegisterCallback(event, handler, opts?)ServerRegisters a server-side NUI callback with optional rate limiting.
exports.quanticPhone:RegisterCallback("myAction", function(source, data, cb)
cb({ ok = true })
end, { rateLimit = 1000 })TriggerClientCallback(source, event, cb, ...)ServerCalls a client-side callback from the server.
exports.quanticPhone:TriggerClientCallback(source, "getHp", function(hp)
print("Player HP:", hp)
end)AwaitClientCallback(source, event, ...) → anyServerAsync/await version of TriggerClientCallback.
local hp = exports.quanticPhone:AwaitClientCallback(source, "getHp")
print("Player HP:", hp)Events
| Event | Side | Description |
|---|---|---|
| quanticPhone:phoneOpened | Client | Fired when the phone UI opens |
| quanticPhone:phoneClosed | Client | Fired when the phone UI closes |
| quantic:bank:balanceUpdated | Client | Bank/cash balance changed — push a refresh |
| quanticPhone:updateConnectedWifi | Client | WiFi connection state changed |
| quanticPhone:setAirplaneMode | Client | Airplane mode toggled |
| quanticPhone:removePhone | Client | Phone item removed from the player |
| quanticPhone:client:updatePlayerFlashlight | Client | Flashlight state changed |
| quanticPhone:messageSent | Server | A message was sent (source, data) |
| quanticPhone:onItemUsed | Server | Phone item was used from inventory |
| quanticPhone:playerDied | Server | Phone owner died |
| quanticPhone:server:onLosePhone | Server | Phone item lost/removed from inventory |
| quanticPhone:requestNearbyPhones | Server | Client requested nearby phone list |
| quanticPhone:publicPhonesUpdated | Server→Client | Public phone system status changed |
| quanticPhone:customAppsSync | Server→Client | Custom apps list synchronized |
| quanticPhone:receivePhoneShareRequest | Client | Incoming phone-number share request |
| quanticPhone:nearbyPhonesUpdated | Client | Nearby phones list updated |
NUI callbacks (call flow)
| Callback | Trigger |
|---|---|
| quanticphone:startCall | Player pressed the call button |
| quanticphone:acceptCall | Player accepted an incoming call |
| quanticphone:rejectCall | Player rejected an incoming call |
| quanticphone:ignoreCall | Player dismissed call notification |