Page cover image

Installation and Config

Here you will get your installation guide for the script and how to configure it as per your server.

Buy Script

CFX Post

Youtube Preview

Dependencies

Installation Guide

  1. Download the script from your Keymaster

  2. Unzip the file a5-outfits.zip and place it in your resource folder

  3. In your server.cfg do ensure a5-outfits

  4. Restart your server

Configure Your Resource

Framework Setup

If you renamed your framework from "qb-core" to something else you can change it. Go to a5-outfits/Shared/sh_config.lua and change the value to whatever you renamed your framework to

Shared/sh_config.lua
Shared.Framework = 'qb-core' -- In case you've renamed your Framework

If you are using Old QBCore without the export. You can enable the option in a5-outfits/Shared/sh_config.lua

Shared/sh_config.lua
Shared.UseOldQB = false -- if you want to use old method of calling core and not the export
Shared.OldQbTrigger = "QBCore:GetObject"

Clothing script setup

The scripts supports three clothing scripts. qb-clothing, illenium-appearance and raid_clothes. Make sure you set it up correctly in a5-outfits/Shared/sh_config.lua

Shared/sh_config.lua
Shared.ClothingScript = "qb-clothing" --"qb-clothing" "raid_clothing" "illenium-appearance" this will determine what type of skin your players use.

Debug Mode

You can enable debugmode in a5-outfits/Shared/sh_config.lua this will allow you to see debug prints this will also enable debug polys

Shared/sh_config.lua
Shared.Debug = false --enable debug prints and debug polys

Outfits Menu

Outfits System

The outfits menu can be run using the command "outfits" it will only work in any of the clothing stores. You can change the command paramters from the sh_config.lua

Shared/sh_config.lua
Shared.Command = "outfits" -- command to open the outfit menu
Shared.CommandDescription = "Outfits Menu"

Alternatively, you can enable admin command where the outfits UI can be toggled anywhere for admins.

Shared/sh_config.lua
Shared.EnableAdminCommand = true -- admin command to open outfits menu anyhwere
Shared.AdminCommandPerm = "admin" -- permission for admin command
Shared.AdminCommandName = "ao" -- the command to use

Outfits Database

The script automatically saves all outfits data into a json database. You do not have to do anything or change any values. The database gets updated on resource stop and on sudden shutdowns of the server including Txadmin restart. In addition to that it saves by default every 5 minutes. You can change that value to something lower or higher.

Shared/sh_config.lua

Shared.DBSaveInterval = 5 -- time in minutes to update json database (do not change unless you know what you are doing)

Clothing Menu

Clothing Menu

The clothing menu is where a player can toggle various parts of his clothing. You can setup the key and the default clothing (when he takes them off) all through the sh_config.lua

Shared.ClothingToggleKey = "Y" -- keys can be assigned from https://docs.fivem.net/docs/game-references/input-mapper-parameter-ids/keyboard/
Shared.UseCameraEffectInterior = false -- setting this to true and using the clothing menu in interiors could glitch the camera and pass through walls.
Shared.DefaultGloves = {male = 15, female = 15} -- put here the number of the default gloves when a player removes their gloves
Shared.DefaultShoes = {male = 34, female = 35} -- put here the number of the default shoes when a player removes their shoes
Shared.DefaultShirt = {male = 15, female = 15} -- put here the number of the default shirt when a player removes their shirt
Shared.DefaultPants = {male = 61, female = 15} -- put here the number of the default pants when a player removes their pants
Shared.RefreshSkinCommand = "refreshskin" -- if you changed this from default QB then change it here as well

In addition to that, you can set some restriction on where he cannot use the clothing menu. For example when he is in a car

Shared.DisableMenu = { --this disables the Y menu during these events
    InVehicle = true, --if player is inside a vehicle
    WhileSwimming = true, --if player is swimming
    WhileRagdoll = true, --if player is radgolled
}

Camera Mode

Camrea Mode

The camera mode allows players to use a UI where they can change their character FOV and take amazing pictures with filters. The system uploads pictures to discord and saves their values in a small gallery included. Through the sh_config.lua you can disable the camera mode and setup the values as per your liking.

Shared.CameraButton = true -- to enable or disable camera mode button
Shared.Cameramodeheader = 'A5 Camera Mode' -- camera mode header text
Shared.DiscordWebHook = "YOUR-WEBHOOK-HERE" -- Put your webhook here to save screenshots to discord https://support.discord.com/hc/en-us/articles/228383668-Intro-to-Webhooks
Shared.MovingX = {Min = -14, Max = 14} -- the maximum and minimum movement horizontaly
Shared.MovingY = {Min = -14, Max = 14} -- the maximum and minimum movement verticaly
Shared.MovingZ = {Min = 0, Max = 8} -- the maximum and minimum movement longitudely ?
Shared.MovingFov = {Min = -12, Max = 40} -- the maximum and minimum FOV
Shared.MaxFilterStrength = 2.6

Extra Functions

These functions are extra for your customisation purposes. You can use them to trigger things like logs for example

Server
---this function triggers when a player creates a new outfit
---@param src string - source of the player
---@param citizenid string - citizen id of player
---@param slot string - slot of the outfit
---@param name string - name of outfit
---@param color string - color of outfit
function OnNewOutfitCreate(src, citizenid, slot, name, color)
end

---this function triggers when a player deletes an outfit
---@param src string - source of player
---@param citizenid string - citizenid of player
---@param slot string - the outfit slot deleted
function OnOutfitDelete(src, citizenid, slot)
end

---this function triggers when a player deletes an outfit
---@param src string - source of player
---@param citizenid string - citizenid of player
---@param slot string - the outfit slot deleted
function OnOutfitChange(src, citizenid, slot)
end
Client
---triggers when player changes his outfit
function OnOutfitChange()
end

---triggers when the UI closes
function OnUiClose()
end

---triggers when player opens camera mode
function OnCameraModeOpen()
end

Locale

You can change some certain Script locales by heading to a5-outfits/Shared/sh_lang.lua

Shared/sh_lang.lua
Translation = {
    PedNotAllowed = "Not allowed in this ped",
    NothingHere = "Nothing here",
    NothingtoRemove = "There is nothing to remove",
    NoVariant = "There is no variant",
}

Extra Information

  • This resource saves your outfits. So it is advisable to disable outfit saving from qb-clothing or illineum_apperances

  • Default command to open the menu is /outfits

  • You can trigger the outfits UI using command provided in clothing store (/outfits) or using following Server Event: TriggerServerEvent("a5-outfits:server:OpenUI") This will open the UI. Useful to trigger from Housing script or using qb-target in certain place

  • Default polyzones are created for all clothing shops

  • Sometimes inside interiors the Clothing Toggle Menu camera transitation will cause issue as it clashes with a wall. The camera by default is disabled inside interiors in the Shared Config but you can enable it

Last updated