diff --git a/server/framework/esx/migrate.lua b/server/framework/esx/migrate.lua index 2c78108..7f399b3 100644 --- a/server/framework/esx/migrate.lua +++ b/server/framework/esx/migrate.lua @@ -129,8 +129,7 @@ local function convertSkinToNewFormat(oldSkin, gender) return skin end - -lib.addCommand("admin", "migrateskins", function(source) +lib.addCommand("migrateskins", { help = "Migrate skins", restricted = "group.admin" }, function(source) local users = Database.Users.GetAll() local convertedSkins = 0 if users then @@ -154,4 +153,4 @@ lib.addCommand("admin", "migrateskins", function(source) type = "success", position = Config.NotifyOptions.position }) -end, nil, "Migrate skins to illenium-appearance") +end) diff --git a/server/framework/qb/migrate.lua b/server/framework/qb/migrate.lua index e00621c..4c2e82b 100644 --- a/server/framework/qb/migrate.lua +++ b/server/framework/qb/migrate.lua @@ -69,7 +69,16 @@ RegisterNetEvent("illenium-appearance:server:migrate-qb-clothing-skin", function }) end) -lib.addCommand("god", "migrateskins", function(source, args) +lib.addCommand("migrateskins", { + help = "Migrate skins", + params = { + { + name = "resourceName", + type = "string", + }, + }, + restricted = "group.god" +}, function(source, args) local resourceName = args.resourceName if resourceName == "fivem-appearance" then MigrateFivemAppearance(source) @@ -85,4 +94,4 @@ lib.addCommand("god", "migrateskins", function(source, args) position = Config.NotifyOptions.position }) end -end, {"resourceName:string"}, "Migrate skins") +end) diff --git a/server/server.lua b/server/server.lua index 276264f..26876cb 100644 --- a/server/server.lua +++ b/server/server.lua @@ -302,7 +302,18 @@ RegisterNetEvent("illenium-appearance:server:ResetRoutingBucket", function() end) if Config.EnablePedMenu then - lib.addCommand(Config.PedMenuGroup, "pedmenu", function(source, args) + lib.addCommand("pedmenu", { + help = _L("commands.pedmenu.title"), + params = { + { + name = "playerID", + type = "number", + help = "Target player's server id", + optional = true + }, + }, + restricted = Config.PedMenuGroup + }, function(source, args) local target = source if args.playerID then local citizenID = Framework.GetPlayerID(args.playerID) @@ -319,15 +330,15 @@ if Config.EnablePedMenu then end end TriggerClientEvent("illenium-appearance:client:openClothingShopMenu", target, true) - end, {"playerID:?number"}, _L("commands.pedmenu.title")) + end) end -lib.addCommand(false, "reloadskin", function(source) +lib.addCommand("reloadskin", { help = _L("commands.reloadskin.title") }, function(source) TriggerClientEvent("illenium-appearance:client:reloadSkin", source) -end, nil, _L("commands.reloadskin.title")) +end) -lib.addCommand(false, "clearstuckprops", function(source) +lib.addCommand("clearstuckprops", { help = _L("commands.clearstuckprops.title") }, function(source) TriggerClientEvent("illenium-appearance:client:ClearStuckProps", source) -end, nil, _L("commands.clearstuckprops.title")) +end) lib.versionCheck("iLLeniumStudios/illenium-appearance")