4.2 KiB
4.2 KiB
Configuration
This page explains all configuration options for codem-phone.
Basic Settings
Framework
Config.Framework = "qb"
| Value | Description |
|---|---|
qb |
QBCore Framework |
qbox |
Qbox Framework |
esx |
ESX Framework |
Version & Debug
Config.VersionChecker = true -- Check for updates on resource start
Config.Debug = true -- Print debug messages to console
Sync Settings
Config.SyncFlash = true -- Camera flash and phone flashlight visible to other players
Default Profile Photo
Config.DefaultPhoto = 'https://aiakos.net/codem/api.php?script=codem-phone&file=defaultavatar3.png'
Default profile photo URL for players.
Language
Config.DefaultLanguage = 'en'
| Value | Description |
|---|---|
en |
English |
tr |
Turkish |
Phone Settings
Unique Phone
Config.UniquePhone = false
true = Each character gets a different phone number
false = All characters share the same number
Auto SQL
Config.AutoSql = true
Automatically creates database tables on first setup.
Item Requirement
Config.ItemRequired = true -- Is an item required in inventory to open the phone?
Config.ItemName = 'phone' -- Name of the required item
Inventory System
Config.Inventory = 'qb'
| Value | Inventory System |
|---|---|
qb |
qb-inventory |
ox |
ox_inventory |
tgiann |
tgiann-inventory |
codem |
codem-inventory |
Important: Use abbreviated names, not full names.
Voice Settings
Config.VoiceSettings = {
VoiceScript = 'pma',
}
| Value | Voice System |
|---|---|
pma |
pma-voice |
salt |
saltychat |
toko |
TokoVoip |
mumble |
Mumble-Voip |
Phone Number Format
Prefix
Config.PhoneNumberPrefix = {
"555",
"444",
"222",
"333",
"111"
}
Prefixes to be added at the beginning of phone numbers. Randomly selected.
Format Type
Config.PhoneFormatType = "american"
Available Formats
Config.PhoneNumberFormats = {
{ type = "standard", digitGroups = { 3, 4 }, separator = "-" },
{ type = "extended", digitGroups = { 3, 3, 4 }, separator = "-" },
{ type = "double", digitGroups = { 3, 2, 4 }, separator = "-" },
{ type = "turkish", digitGroups = { 3, 3, 2, 2 }, separator = " " },
{ type = "american", digitGroups = { 3, 3, 4 }, separator = "-" },
}
| Type | Example Output |
|---|---|
standard |
555-4545 |
extended |
555-444-5887 |
double |
555-00-4486 |
turkish |
555 444 22 33 |
american |
(555) 444-5887 |
Admin Permissions
Config.AdminPermissions = {
['admin'] = true,
['superadmin'] = true,
['god'] = true,
}
Permission groups that can use admin commands.
Custom Notification
Config.Notification = function(message, type, isServer, src)
if isServer then
if Config.Framework == "esx" then
TriggerClientEvent("esx:showNotification", src, message)
else
TriggerClientEvent('QBCore:Notify', src, message, type, 1500)
end
else
if Config.Framework == "esx" then
TriggerEvent("esx:showNotification", message)
else
TriggerEvent('QBCore:Notify', message, type, 1500)
end
end
end
| Parameter | Type | Description |
|---|---|---|
message |
string | Notification message |
type |
string | Notification type (success, error, info) |
isServer |
boolean | Whether triggered from server-side |
src |
number | Player source ID (for server-side) |
You can edit this function to integrate your own notification system.