Skip to content

Commit

Permalink
chore: 🎨 Run formatter
Browse files Browse the repository at this point in the history
  • Loading branch information
bitpredator committed Nov 14, 2024
1 parent 09dea56 commit bc39292
Showing 1 changed file with 27 additions and 25 deletions.
Original file line number Diff line number Diff line change
@@ -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)
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)

0 comments on commit bc39292

Please sign in to comment.