Config Preview
π§ See the current config files
Viority Interaction Config
ViorityCore.lua
--- @diagnostic disable: duplicate-set-field, undefined-field, inject-field
ESX = nil -- Do not touch this!
ViorityLocales = {} -- Do not touch this!
ViorityCore = {} -- Do not touch this!
-- Version Notification
ViorityCore.VersionNotification = {
['activate'] = false, -- Activate the Version Notification
['webhook'] = "https://canary.discord.com/api/webhooks/XXX/XXX", -- Change the Webhook for the Version Notification
}
-- Initialize ESX
ViorityCore.ESXVersion = 'legacy' -- Choose your ESX Version (1.1, 1.2, oldlegacy(until 1.9) or legacy(since 1.9))
ViorityCore.LoadESX = function(State) -- Load ESX Function | ONLY CHANGE THEM IF YOU KNOW EXACTLY WHAT YOU ARE DOING!!!
if State == 'server' then
if ViorityCore.ESXVersion == 'legacy' then
ESX = exports["es_extended"]:getSharedObject()
else
TriggerEvent('esx:getSharedObject', function(obj) ESX = obj end)
end
elseif State == 'client' then
if ViorityCore.ESXVersion == 'legacy' then
ESX = exports["es_extended"]:getSharedObject()
else
Citizen.CreateThread(function()
while not ESX do
TriggerEvent('esx:getSharedObject', function(obj) ESX = obj end)
Citizen.Wait(150)
end
while not ESX.GetPlayerData().job do
ESX.PlayerData = ESX.GetPlayerData()
Citizen.Wait(150)
end
end)
RegisterNetEvent("esx:playerLoaded")
AddEventHandler("esx:playerLoaded", function(xPlayer)
ESX.PlayerData = xPlayer
end)
RegisterNetEvent("esx:setJob")
AddEventHandler("esx:setJob", function(job)
ESX.PlayerData.job = job
end)
end
end
end
-- Get Identifier (Rockstar Identifier, Steam Identifier or Your Multichar System)
ViorityCore.GetIdentifier = function(source)
local source = source -- Save Variable
local Identifier = nil -- Create new Variable
---- FOR STEAM IDENTIFIER ----
-- for k,v in pairs(GetPlayerIdentifiers(source)) do
-- if string.sub(v, 1, string.len("steam:")) == "steam:" then
-- Identifier = v -- Returns steam:XXX
-- end
-- end
---- FOR STEAM IDENTIFIER ----
---- FOR ROCKSTAR IDENTIFIER ----
local xPlayer = ESX.GetPlayerFromId(source)
if xPlayer then
Identifier = xPlayer.getIdentifier()
else
for k,v in pairs(GetPlayerIdentifiers(source)) do
if string.sub(v, 1, string.len("license:")) == "license:" then
Identifier = v:gsub("license:", "") -- Returns XXX License
end
end
end
---- FOR ROCKSTAR IDENTIFIER ----
return Identifier
end
-- Activate the Debug modus to identify a bug in the code
ViorityCore.DebugMode = false
-- Basic Settings
ViorityCore.InternalPrefix = 'viority_interaction:' -- The Internal Trigger Prefix | Attention you have to change any integrations in other scripts!
ViorityCore.EventWrongToken = function(source) -- This happens when a player tried to trigger an event with the wrong token! Most likely, it will be a cheater who tries to gain unfair advantages through serverside events.
-- You can implement a ban system here!
DropPlayer(source, "β€οΈ Do not try to cheat on our server!")
end
ViorityCore.Locales = 'de' -- Choose your Language (de or en) | You can add more in the locales folder!
ViorityCore.OS = 'windows' -- Choose your OS (windows or linux)
ViorityCore.ESXInteraction = false -- If you want to use the ESX.ShowHelpNotification instead of our Interaction. Attention this will increase the client-performance!
Viority Interaction Locales
Reminder: You can create your own locale file in your language π
en.lua
ViorityLocales['en'] = {
-- Nothing to Translate
}
Last updated