WiFi & Charging
Define WiFi hotspot zones where players can connect for a network label, and charging stations where the phone battery recharges automatically.
WiFi hotspots
Each entry in Config.WifiPoints defines a zone where the phone shows a WiFi network:
lua
Config.WifiPoints = {
{
id = "police_hq",
label = "LSPD-Internal",
coords = vector2(441.2, -979.7), -- XY only (height ignored)
range = 10.0, -- radius in metres
password = "aw2nnaw2g6", -- nil for open network
speed = "fast", -- optional: label shown in UI
},
{
id = "maze_bank",
label = "MazeBank-WiFi",
coords = vector2(149.41, -1042.19),
range = 10.0,
password = "a5ny4y2",
},
}| Field | Type | Description |
|---|---|---|
| id | string | Unique identifier (used in exports) |
| label | string | Network name shown in the phone's WiFi list |
| coords | vector2 | XY centre of the WiFi zone |
| range | number | Coverage radius in metres |
| password | string | nil | Password required to connect; nil = open network |
WiFi connections are managed via the Settings app → WiFi. Players select a network, enter the password (if any) and the phone shows the connected SSID in the status bar.
Charging stations
lua
Config.ChargePoints = {
enabled = true,
chargeInterval = 5000, -- milliseconds between charge ticks
chargeAmount = 1, -- % added per tick
marker = {
enabled = true,
type = 20, -- GTA V marker type
size = 0.5,
color = { r=0, g=200, b=255, a=120 },
},
text = {
key = "E",
label = "[E] Charge phone",
},
locations = {
{ coords = vector3(447.4, -980.7, 30.0), heading = 0.0 },
-- add more locations as needed
},
}| Key | Description |
|---|---|
| enabled | Enable or disable all charging stations |
| chargeInterval | Milliseconds between each charge tick (5000 = 5 seconds) |
| chargeAmount | Battery % added per tick |
| marker.enabled | Show a 3D marker above each charging station |
| text.key / text.label | Key prompt shown when the player is near the station |
| locations | Array of { coords, heading } for each charging point |
You can also trigger charging from an external resource using the SetCharging client export — useful for custom charging props or vehicles.
WiFi exports
GetWifiPoints() → tableServerReturns all registered WiFi hotspots.
lua
local points = exports.quanticPhone:GetWifiPoints()CreateWifiPoint(id, data)ServerAdds a WiFi hotspot at runtime.
lua
exports.quanticPhone:CreateWifiPoint("my_cafe", {
label = "CoffeeShop-Free",
coords = vector2(200.0, -800.0),
range = 15.0,
password = nil, -- open network
})RemoveWifiPoint(id)ServerRemoves a WiFi hotspot by its ID.
lua
exports.quanticPhone:RemoveWifiPoint("my_cafe")