Config Files
The script is fully configurable, allowing complete customization of its behavior and features. Below is a list of configuration files included in the resource.
op-multicharacter/config/MainConfig.lua
-- ββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
-- Dependency Check Helper
-- (Information) βΊ Returns the first matching started resource alias from provided table.
-- (Information) βΊ Used by Clothing / Notify detection above.
-- ββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
function scriptCheck(data) -- Do not modify unless you know what you're doing.
for k, v in pairs(data) do
if GetResourceState(k):find('started') ~= nil then
return v
end
end
return false
end
-- βββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
-- OTHERPLANET / OP Multicharacter - Main Configuration File
-- (Information) βΊ This file controls language, clothing integration, currency,
-- spawn selector, starter items, notifications and scenes.
-- (Information) βΊ Do not rename fields or change structure unless you know
-- exactly how the script reads this config.
-- βββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
Config = {}
-- βββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
-- Locale & Debug
-- (Information) βΊ Locale controls which translation file is loaded.
-- (Information) βΊ Debug enables extra prints/logs for troubleshooting.
-- βββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
Config.Locale = "en" -- Supported: EN
Config.Debug = true
-- βββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
-- Clothing System Detection
-- (Information) βΊ Automatically detects which clothing/appearance system you use.
-- (Information) βΊ Add your resource name and internal alias to `availableClothing`
-- if you want to support a new clothing script.
-- (Information) βΊ Following clothing scripts will not start cutscene/spawn selector after character created: tgiann-clothing
-- βββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
local availableClothing = {
['skinchanger'] = "skinchanger",
['crm-appearance'] = "crm-appearance",
['fivem-appearance'] = "fivem-appearance",
['illenium-appearance'] = "illenium-appearance",
['qb-clothing'] = "qb-clothing",
['rcore_clothing'] = "rcore_clothing",
['tgiann-clothing'] = "tgiann-clothing",
}
Config.Clothing = scriptCheck(availableClothing) or "none"
-- βββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
-- Notify System Detection
-- (Information) βΊ Automatically detects which notify system you use.
-- (Information) βΊ Add your resource name and internal alias to `notifyScripts`
-- if you want to support a new notify script
-- βββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
local notifyScripts = { -- Notify libraries detection
['okokNotify'] = "okokNotify",
['vms_notify'] = "vms_notify",
['ox_lib'] = "ox_lib",
['brutal_notify'] = "brutal_notify",
['op-hud'] = "op_hud",
}
Config.Notify = scriptCheck(notifyScripts) or "none" -- Notify system: none / ESX / QBCORE / QBOX or auto detected from list 'notifyScripts'
-- βββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
-- Currency Formatting
-- (Information) βΊ Visual currency format used in UI (JS Intl.NumberFormat).
-- (Information) βΊ Does not change actual economy, only how numbers are shown.
-- βββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
Config.CurrencySettings = {
-- https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Intl/NumberFormat
currency = "USD",
style = "currency",
format = "en-US"
}
-- βββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
-- Start Cutscene
-- (Information) βΊ Enables or disables the initial intro cutscene for players.
-- βββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
Config.EnableStartCutScene = true
Config.CutSceneData = {
welcomeTextHeader = "OTHERPLANET",
welcomeTextDesc = "Welcome on the best server!"
}
-- βββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
-- Player Switch Function
-- (Information) βΊ Enables or disables the player switch (Map zoom and zoom-out).
-- (Information) βΊ If you disabled Spawn Selector you can also adjust start
-- coordinates here!
-- βββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
Config.SwitchPlayer = {
enable = true, -- This will work only if spawn selector is disabled!
startCoords = vec4(-1037.6252, -2737.7544, 19.1693, 326.5721), -- This will work only if spawn selector is disabled!
disableSwitchOnNewCharacter = true, -- Disables switch on new character
}
-- βββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
-- Spawn Selector
-- (Information) βΊ Controls the spawn menu that appears after character select.
-- (Information) βΊ "isLastLocation = true" will use last saved coordinates.
-- (Information) βΊ "spawnCoords = vec4(...)" defines static spawn locations.
-- βββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
Config.SpawnSelector = {
enable = true,
locations = {
["1"] = {
isLastLocation = true,
spawnCoords = false,
label = "Last Location",
image = "https://img.gta5-mods.com/q95/images/felix-s-movie-like-reshade/3d87bc-GTA52019-11-0912-35-04_Easy-Resize.com.jpg"
},
["2"] = {
isLastLocation = false,
spawnCoords = vec4(-268.8336, -956.3636, 30.2231, 205.1087),
label = "Los Santos",
image = "https://cdn.mos.cms.futurecdn.net/9QfCTPwV3DkPuUgBHrorom-1200-80.jpg"
},
["3"] = {
isLastLocation = false,
spawnCoords = vec4(-19.8265, 6497.2964, 30.5491, 51.6798),
label = "Paleto Bay",
image = "https://c4.wallpaperflare.com/wallpaper/143/671/687/grand-theft-auto-online-grand-theft-auto-v-mountain-chiliad-chiliad-mountain-state-wilderness-state-wilderness-paleto-bay-los-santos-wallpaper-preview.jpg"
},
["4"] = {
isLastLocation = false,
spawnCoords = vec4(1527.3490, 3774.9458, 33.5113, 193.8923),
label = "Sandy Shores",
image = "https://img.gta5-mods.com/q75/images/sandy-shores-remaster-ymap/c276b2-SandyShores1-min.png"
},
}
}
-- βββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
-- Server Branding (UI Text & Logos)
-- (Information) βΊ Controls server name, description and logo in the UI.
-- βββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
Config.ServerDetails = {
serverName = "OTHERPLANET",
serverCreatorDesc = "Create your new character and start journey on the best FiveM server.",
serverLogo = "https://data.otherplanet.dev/img/op-white.png"
}
-- βββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
-- Starter Items
-- (Information) βΊ Optional items/money granted to new characters.
-- (Information) βΊ Works separately from itemShop in Config.Misc.
-- βββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
Config.StarterItems = {
enable = false,
list = {
{
type = "item",
nameSpawn = "bread",
quanity = 3
},
{
type = "money", -- money, bank
nameSpawn = "", -- leave blank
quanity = 5000
}
}
}
-- βββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
-- Miscellaneous Settings
-- (Information) βΊ General behaviour: notifications, character slots and
-- optional item shop available on character creation.
-- βββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
Config.Misc = {
DefaultCharsAmount = 3,
AllowCharacterDelete = true,
itemShop = {
enable = true,
money = 6500, -- Starting budget for shop purchases
items = {
{
type = "item",
nameSpawn = "bread",
label = "Sandwich",
price = 500,
maxQuanity = 5,
image = "https://data.otherplanet.dev/fivemicons/%5bfood%5d/hornsandwich.png",
},
{
type = "item",
nameSpawn = "water",
label = "Water",
price = 250,
maxQuanity = 5,
image = "https://data.otherplanet.dev/fivemicons/%5bfood%5d/water_bottle.png",
},
{
type = "item",
nameSpawn = "phone",
label = "Phone",
price = 1500,
maxQuanity = 1,
image = "https://data.otherplanet.dev/fivemicons/%5belectronics%5d/ifruit_blue.png",
},
{
type = "item",
nameSpawn = "energydrink",
label = "Energy Drink",
price = 750,
maxQuanity = 3,
image = "https://data.otherplanet.dev/fivemicons/%5bfood%5d/sprunk.png",
},
{
type = "car",
nameSpawn = "blista",
label = "Blista",
price = 2000,
maxQuanity = 1,
image = "https://cdn.majestic-files.com/public/master/static/img/vehicles/blista.png",
},
{
type = "car",
nameSpawn = "bmx",
label = "BMX",
price = 800,
maxQuanity = 1,
image = "https://cdn.majestic-files.com/public/master/static/img/vehicles/bmx.png",
},
}
}
}
-- βββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
-- Scenes Configuration
-- (Information) βΊ Defines cinematic scenes used for character selection.
-- (Information) βΊ Includes camera paths, characters placements, props,
-- vehicles and weather presets per scene.
-- βββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
Config.Scenes = {
["xmas"] = {
SceneCoords = vec4(173.6660, -912.0629, 31.3267, 258.4043), -- Player will be teleported to this coords! This is really important.
InitialCamTime = 7.0,
InitialCamCoords = vec4(190.3594, -941.9056, 35.9057, 47.8419),
InitialCamLookAtCoords = vec4(165.9147, -919.8946, 32.8227, 47.9994),
charactersPlacement = {
{
coords = vec4(163.3140, -926.8589, 30.6239, 218.1640),
animation = {
Dict = "anim@scripted@player@fix_astu_ig8_weed_smoke_v1@male@",
Lib = "male_pos_a_p2_base"
},
prop = false,
weapon = false,
camera = {
toCoords = vec4(169.6110, -926.8345, 31.3267, 75.3578),
zoom = 20.0,
duration = 3.0,
},
insideVehicle = false, -- unique identifier of vehicle which you add in vehicles section.
insideVehicleSeat = 0, -- 1-4 Seat in vehicle
},
{
coords = vec4(165.9431, -918.2198, 30.3717, 192.0681),
animation = {
Dict = "anim@scripted@freemode@ig7_office_cell_floor@heeled@",
Lib = "base_pose_01"
},
prop = false,
weapon = false,
camera = {
toCoords = vec4(168.6161, -925.0262, 31.3221, 11.7331),
zoom = 50.0,
duration = 3.0,
},
insideVehicle = false,
insideVehicleSeat = 0,
},
{
coords = vec4(173.1998, -917.3516, 30.3267, 151.3287),
animation = {
Dict = "amb@world_human_aa_coffee@base",
Lib = "base"
},
prop = {
Prop = "pata_christmasfood1",
PropBone = 28422,
PropPlacement = {
0.0100,
-0.1100,
-0.1300,
0.0,
0.0,
0.0
}
},
weapon = false,
camera = {
toCoords = vec4(165.6446, -922.1199, 32.7531, 302.8799),
zoom = 40.0,
duration = 3.0,
},
insideVehicle = false,
insideVehicleSeat = 0,
},
},
newCharacter = {
-- Coords where you will create new character
coords = vec4(-763.3376, 329.4693, 198.4861, 183.4883)
},
vehicles = {},
customProps = {},
weather = {
hour = 21,
minute = 0,
weather = "XMAS",
-- EXTRASUNNY
-- CLEAR
-- CLOUDS
-- SMOG
-- FOGGY
-- OVERCAST
-- RAIN
-- THUNDER
-- CLEARING
-- NEUTRAL
-- SNOW
-- BLIZZARD
-- SNOWLIGHT
-- XMAS
-- HALLOWEEN
}
},
--[[["scene_1"] = {
SceneCoords = vec4(49.2859, 7184.5527, 2.4002, 64.6467), -- Player will be teleported to this coords! This is really important.
InitialCamTime = 7.0,
InitialCamCoords = vec4(34.9546, 7199.9526, 10.2047, 248.3370),
InitialCamLookAtCoords = vec4(66.0174, 7188.3491, 1.4332, 59.7735),
charactersPlacement = {
{
coords = vec4(67.7456, 7194.3882, 1.5501, 42.4638),
animation = {
Dict = "missdocksshowoffcar@idle_a",
Lib = "idle_b_5"
},
prop = false,
weapon = false,
camera = {
toCoords = vec4(64.6069, 7200.0630, 2.8786, 227.4351),
zoom = 20.0,
duration = 2.0,
},
insideVehicle = false,
insideVehicleSeat = 0,
},
{
coords = vec4(66.0174, 7188.3491, 1.4332, 59.7735),
animation = false,
prop = false,
weapon = false,
camera = {
toCoords = vec4(61.9422, 7192.1289, 2.8725, 227.2279),
zoom = 20.0,
duration = 3.0,
},
insideVehicle = "veh25", -- unique identifier of vehicle which you add in vehicles section.
insideVehicleSeat = 1, -- 1-4 Seat in vehicle
},
{
coords = vec4(59.7110, 7183.2471, 1.6228, 322.9862),
animation = {
Dict = "amb@world_human_drinking@coffee@male@idle_a",
Lib = "idle_c"
},
prop = {
Prop = "ba_prop_battle_whiskey_bottle_2_s",
PropBone = 28422,
PropPlacement = {
0.0,
0.0,
0.05,
0.0,
0.0,
0.0
}
},
weapon = false,
camera = {
toCoords = vec4(60.7500, 7188.7920, 2.8235, 170.8597),
zoom = 20.0,
duration = 3.0,
},
insideVehicle = false,
insideVehicleSeat = 0,
},
},
newCharacter = {
-- Coords where you will create new character
coords = vec4(-763.3376, 329.4693, 198.4861, 183.4883)
},
vehicles = {
["veh25"] = {
model = "blazer2",
settings = {}, -- Vehicle settings from getVehicleProperties!
coords = vec4(66.8167, 7188.5024, 2.3827, 90.3962),
}
},
customProps = {
{
name = "xm_prop_base_tripod_lampb",
coords = vec4(69.9330, 7188.8125, 1.1861, 274.8404),
},
{
name = "xm_prop_base_tripod_lampb",
coords = vec4(67.5469, 7186.2432, 1.2403, 179.5323),
},
},
weather = {
hour = 23,
minute = 0,
weather = "SMOG",
-- EXTRASUNNY
-- CLEAR
-- CLOUDS
-- SMOG
-- FOGGY
-- OVERCAST
-- RAIN
-- THUNDER
-- CLEARING
-- NEUTRAL
-- SNOW
-- BLIZZARD
-- SNOWLIGHT
-- XMAS
-- HALLOWEEN
}
}--]]
}
-- ββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
-- HUD Switch
-- (Information) βΊ Function will toggle hud when needed to provide best user experience!
-- ββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
Config.SwitchHud = function(toggle)
if toggle then
DisplayRadar(true)
-- Display HUD
else
DisplayRadar(false)
-- Hide HUD
end
endop-multicharacter/config/ServerConfig.lua
ServerConfig = {}
ServerConfig.LogsWebhook = "https://discord.com/api/webhooks/" -- Discord webhook.
ServerConfig.EnableDiscordRanks = GetResourceState("op-bot") ~= "missing"
ServerConfig.Commands = {
logout = {
enable = true,
command = "logout",
allowed = "user"
},
setslots = {
enable = true,
command = "setslots",
allowed = "admin"
},
}
ServerConfig.LogsData = {
['character_loaded'] = {
color = 706333,
header = "Player Connected",
desc = "**Character Name:** `%s`\n**Character ID:** `%s`\n**Player Identifiers:** ```%s```"
},
['character_created'] = {
color = 706333,
header = "Character Created",
desc = "**Name:** `%s`\n**ID:** `%s`\n**Nationality:** `%s`\n**Birthday:** `%s`\n**Gender:** `%s`\n**Height:** `%s`\n**Player Identifiers:** ```%s```\n**Starting Items:** ```%s```"
},
['character_unloaded'] = {
color = 13044234,
header = "Character Log Out",
desc = "**Character Name:** `%s`\n**Character ID:** `%s`\n**Player Identifiers:** ```%s```"
},
['slotsadded'] = {
color = 706333,
header = "Slots Added",
desc = "**Admin:** `%s`\n**License:** `%s`\n**Amount:** `%s`"
},
}
-- ββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
-- (Information) βΊ Formats webhook message based on LogsData entry and sends it.
-- (Information) βΊ Usage example:
-- ServerConfig.formatWebHook("character_created", arg1, arg2, ...)
-- ββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
---@param logType string -- key in ServerConfig.LogsData
---@param ... any -- formatting params for desc
---@return table -- { title = "", color = 0, message = "" }
ServerConfig.formatWebHook = function(logType, ...)
local log = ServerConfig.LogsData[logType]
if not log then
print("^1[OP-MULTICHARACTER] Invalid logType: " .. tostring(logType))
return false
end
local formattedDesc = string.format(log.desc, ...)
local embed = {{
["color"] = log.color,
["title"] = log.header,
["description"] = formattedDesc,
["footer"] = { text = os.date("%c") .. " (Server Time)." }
}}
PerformHttpRequest(ServerConfig.LogsWebhook,
function(err, text, headers) end,
"POST",
json.encode({ username = "OP Multicharacter", embeds = embed }),
{ ["Content-Type"] = "application/json" }
)
endUseful Articles
Last updated