Functions
if Config.Framework == "standalone" then
print("m-CityGuide - Standalone Version Started")
elseif Config.Framework == "qb-core" then
QBCore = exports["qb-core"]:GetCoreObject()
elseif Config.Framework == "esx" then
ESX = exports['es_extended']:getSharedObject()
end
function Notify(msg, type, time)
if Config.Notify == "standalone" then
BeginTextCommandThefeedPost("STRING")
AddTextComponentSubstringPlayerName(msg)
EndTextCommandThefeedPostTicker(true, true)
elseif Config.Notify == "qb" then
QBCore.Functions.Notify(msg, type, time)
elseif Config.Notify == "okok" then
exports['okokNotify']:Alert('City Guide', msg, 5000, type, true)
elseif Config.Notify == "ox" then
lib.notify({ title = 'City Guide', description = msg, type = type })
elseif Config.Notify == "esx" then
ESX.ShowNotification(msg, type, time)
end
end
function MakeAnimation(anim)
if Config.EmoteMenu == "dp" then
TriggerEvent('animations:client:EmoteCommandStart', {anim})
elseif Config.EmoteMenu == "rp" then
exports["rpemotes"]:EmoteCommandStart(anim)
elseif Config.EmoteMenu == "scully" then
exports["scully_emotemenu"]:playEmoteByCommand(anim)
else
print("Missing or write wrong on: Config.EmoteMenu")
end
end
function CancelAnimation(anim)
if Config.EmoteMenu == "dp" then
TriggerEvent('animations:client:EmoteCommandStart', {anim})
elseif Config.EmoteMenu == "rp" then
exports["rpemotes"]:EmoteCommandStart(anim)
elseif Config.EmoteMenu == "scully" then
exports["scully_emotemenu"]:cancelEmote()
else
print("Missing or write wrong on: Config.Utility.EmoteMenu")
end
end
function SendHelpText(msg, position)
if Config.HelpText == "qb" then
exports['qb-core']:DrawText(msg, position)
elseif Config.HelpText == "ox" then
lib.showTextUI(msg)
end
end
function RemoveHelpText()
if Config.HelpText == "qb" then
exports['qb-core']:HideText()
elseif Config.HelpText == "ox" then
lib.hideTextUI()
end
end
Last updated