diff --git a/server-data/resources/[esx_addons]/rpemotes/server/frameworks/qb-core.lua b/server-data/resources/[esx_addons]/rpemotes/server/frameworks/qb-core.lua index ca2499509..cce716f3e 100644 --- a/server-data/resources/[esx_addons]/rpemotes/server/frameworks/qb-core.lua +++ b/server-data/resources/[esx_addons]/rpemotes/server/frameworks/qb-core.lua @@ -1,54 +1,56 @@ -if Config.Framework ~= 'qb-core' then return end +if Config.Framework ~= "qb-core" then + return +end -local framework = 'qb-core' +local framework = "qb-core" local state = GetResourceState(framework) -if state == 'missing' or state == "unknown" then +if state == "missing" or state == "unknown" then -- Framework can't be used if it's missing or unknown return end -local QBCore = exports['qb-core']:GetCoreObject() +local QBCore = exports["qb-core"]:GetCoreObject() -- https://github.com/qbcore-framework/dpemotes/blob/master/Server/Server.lua#L101-L141 -QBCore.Commands.Add('e', 'Play an emote', {{ name="emotename", help="dance, camera, sit or any valid emote."}}, true, function(source, args) - TriggerClientEvent('animations:client:PlayEmote', source, args) +QBCore.Commands.Add("e", "Play an emote", { { name = "emotename", help = "dance, camera, sit or any valid emote." } }, true, function(source, args) + TriggerClientEvent("animations:client:PlayEmote", source, args) end) -QBCore.Commands.Add('emote', 'Play an emote', {{ name="emotename", help="dance, camera, sit or any valid emote."}}, true, function(source, args) - TriggerClientEvent('animations:client:PlayEmote', source, args) +QBCore.Commands.Add("emote", "Play an emote", { { name = "emotename", help = "dance, camera, sit or any valid emote." } }, true, function(source, args) + TriggerClientEvent("animations:client:PlayEmote", source, args) end) if Config.SqlKeybinding then - QBCore.Commands.Add('emotebind', 'Bind an emote', {{ name="key", help="num4, num5, num6, num7. num8, num9. Numpad 4-9!"}, { name="emotename", help="dance, camera, sit or any valid emote."}}, true, function(source, args) - TriggerClientEvent('animations:client:BindEmote', source, args) + QBCore.Commands.Add("emotebind", "Bind an emote", { { name = "key", help = "num4, num5, num6, num7. num8, num9. Numpad 4-9!" }, { name = "emotename", help = "dance, camera, sit or any valid emote." } }, true, function(source, args) + TriggerClientEvent("animations:client:BindEmote", source, args) end) - QBCore.Commands.Add('emotebinds', 'Check your currently bound emotes.', {}, false, function(source) - TriggerClientEvent('animations:client:EmoteBinds', source) + QBCore.Commands.Add("emotebinds", "Check your currently bound emotes.", {}, false, function(source) + TriggerClientEvent("animations:client:EmoteBinds", source) end) end -QBCore.Commands.Add('emotemenu', 'Open rpemotes menu (F3) by default.', {}, false, function(source) - TriggerClientEvent('animations:client:EmoteMenu', source) +QBCore.Commands.Add("emotemenu", "Open rpemotes menu (F3) by default.", {}, false, function(source) + TriggerClientEvent("animations:client:EmoteMenu", source) end) -QBCore.Commands.Add('em', 'Open rpemotes menu (F3) by default.', {}, false, function(source) - TriggerClientEvent('animations:client:EmoteMenu', source) +QBCore.Commands.Add("em", "Open rpemotes menu (F3) by default.", {}, false, function(source) + TriggerClientEvent("animations:client:EmoteMenu", source) end) -QBCore.Commands.Add('emotes', 'List available emotes.', {}, false, function(source) - TriggerClientEvent('animations:client:ListEmotes', source) +QBCore.Commands.Add("emotes", "List available emotes.", {}, false, function(source) + TriggerClientEvent("animations:client:ListEmotes", source) end) -QBCore.Commands.Add('walk', 'Set your walkingstyle.', {{ name="style", help="/walks for a list of valid styles"}}, true, function(source, args) - TriggerClientEvent('animations:client:Walk', source, args) +QBCore.Commands.Add("walk", "Set your walkingstyle.", { { name = "style", help = "/walks for a list of valid styles" } }, true, function(source, args) + TriggerClientEvent("animations:client:Walk", source, args) end) -QBCore.Commands.Add('walks', 'List available walking styles.', {}, false, function(source) - TriggerClientEvent('animations:client:ListWalks', source) +QBCore.Commands.Add("walks", "List available walking styles.", {}, false, function(source) + TriggerClientEvent("animations:client:ListWalks", source) end) -QBCore.Commands.Add('nearby', 'Share emote with a nearby player.', {{ name="emotename", help="hug, handshake, bro or any valid shared emote."}}, true, function(source, args) - TriggerClientEvent('animations:client:Nearby', source, args) -end) \ No newline at end of file +QBCore.Commands.Add("nearby", "Share emote with a nearby player.", { { name = "emotename", help = "hug, handshake, bro or any valid shared emote." } }, true, function(source, args) + TriggerClientEvent("animations:client:Nearby", source, args) +end)