Configuration
Config = {}
Config.locales = {}
Config.locale = "en"
Config.OS = "windows" -- "windows" or "linux"
Config.OpenWithCommand = true
Config.OpenMenuCommand = "mapeditor"
Config.RegisterEvent = true
Config.RegisterEventName = "ak4y-mapEditor-v2:OpenMenu"
function Notify(message, typ)
exports["ak4y-core"]:NotifyViaFramework(message, typ or "error")
end
function Draw3DText(data)
local text = data.text
local x = data.coords.x
local y = data.coords.y
local z = data.coords.z
SetTextScale(0.35, 0.35)
SetTextFont(4)
SetTextProportional(1)
SetTextColour(255, 255, 255, 215)
SetTextEntry("STRING")
SetTextCentre(true)
AddTextComponentString(text)
SetDrawOrigin(x,y,z, 0)
DrawText(0.0, 0.0)
local factor = (string.len(text)) / 370
DrawRect(0.0, 0.0+0.0125, 0.017+ factor, 0.03, 0, 0, 0, 75)
ClearDrawOrigin()
end
function GetLocale(type, index)
local l = Config.locales and Config.locales[Config.locale]
if not l then return index end
local group = l[type]
if not group then return index end
local v = group[index]
if v == nil then return index end
return v
endLast updated