### startPlayerCustomization(callback, config) Source: https://docs.vipex.dev/paid-resources/appearance/exports Starts the player customization interface, typically used for character creation or modification. ```APIDOC ## startPlayerCustomization(callback, config) ### Description Starts the player customization interface. This function is often used as the entry point for character creation or modification menus. ### Parameters #### Path Parameters - **callback** (function) - A callback function to be executed after customization is complete. - **config** (table) - Configuration options for the customization interface. ``` -------------------------------- ### Ensure QB-Core Resources Source: https://docs.vipex.dev/paid-resources/appearance/install/qbcore Add these lines to your server.cfg to ensure the resource starts after your framework and ox_lib. ```cfg ensure qb-core ensure ox_lib ensure illenium-appearance ``` -------------------------------- ### Ensure QBX Resources in server.cfg Source: https://docs.vipex.dev/paid-resources/multicharacter/install/qbox Add these lines to your server.cfg to ensure the necessary resources are started in the correct order. Ensure oxmysql and qbx_core are started before vx_multicharacter. ```cfg ensure oxmysql ensure qbx_core ensure vx_multicharacter ``` -------------------------------- ### Add vx_mdt to server.cfg Source: https://docs.vipex.dev/paid-resources/mdt/installation Add these lines to your server.cfg file. Ensure vx_lib and oxmysql are started before vx_mdt. ```cfg ensure ox_lib ensure oxmysql ensure vx_mdt ``` -------------------------------- ### Install SQL Database Tables Source: https://docs.vipex.dev/paid-resources/appearance/install/qbcore Execute these SQL commands to create necessary tables for managing outfits and player skins. ```sql CREATE TABLE IF NOT EXISTS `management_outfits` ( `id` int(11) NOT NULL AUTO_INCREMENT, `job_name` varchar(50) NOT NULL, `type` varchar(50) NOT NULL, `minrank` int(11) NOT NULL DEFAULT 0, `name` varchar(50) NOT NULL DEFAULT 'Cool Outfit', `gender` varchar(50) NOT NULL DEFAULT 'male', `model` varchar(50) DEFAULT NULL, `props` varchar(1000) DEFAULT NULL, `components` varchar(1500) DEFAULT NULL, PRIMARY KEY (`id`) ) ENGINE=InnoDB AUTO_INCREMENT=1 DEFAULT CHARSET=utf8mb4; CREATE TABLE IF NOT EXISTS `playerskins` ( `id` int(11) NOT NULL AUTO_INCREMENT, `citizenid` varchar(255) NOT NULL, `model` varchar(255) NOT NULL, `skin` text NOT NULL, `active` tinyint(4) NOT NULL DEFAULT 1, PRIMARY KEY (`id`), KEY `citizenid` (`citizenid`), KEY `active` (`active`) ) ENGINE=InnoDB AUTO_INCREMENT=1 DEFAULT CHARSET=latin1; CREATE TABLE IF NOT EXISTS `player_outfits` ( `id` int(11) NOT NULL AUTO_INCREMENT, `citizenid` varchar(50) DEFAULT NULL, `outfitname` varchar(50) NOT NULL DEFAULT '0', `model` varchar(50) DEFAULT NULL, `props` varchar(1000) DEFAULT NULL, `components` varchar(1500) DEFAULT NULL, PRIMARY KEY (`id`), UNIQUE KEY `citizenid_outfitname_model` (`citizenid`,`outfitname`,`model`), KEY `citizenid` (`citizenid`) ) ENGINE=InnoDB AUTO_INCREMENT=1 DEFAULT CHARSET=utf8mb4; CREATE TABLE IF NOT EXISTS `player_outfit_codes` ( `id` int(11) NOT NULL AUTO_INCREMENT, `outfitid` int(11) NOT NULL, `code` varchar(50) NOT NULL DEFAULT '', PRIMARY KEY (`id`), KEY `FK_player_outfit_codes_player_outfits` (`outfitid`) ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci; ``` -------------------------------- ### Example Output for mdt_fixweaponmodels Source: https://docs.vipex.dev/paid-resources/mdt/admin-tools Example output from the mdt_fixweaponmodels command, showing the scan results, number of rows updated, and any unmatched rows. ```text [mdt_fixweaponmodels] Scanned 184 rows: 12 already valid, 169 to remap, 3 unmatched [mdt_fixweaponmodels] Updated 169 weapon row(s). [mdt_fixweaponmodels] 3 unmatched row(s) left untouched: - XJ829S (model: Custom Relic) - QQ3341 (model: RP Hammer) - MM22C9 (model: Lost MC Blade) ``` -------------------------------- ### QBCore Apartment Support Check Source: https://docs.vipex.dev/paid-resources/multicharacter/config Checks if the 'qb-apartments' resource is available to determine support for starting apartments. ```lua return { support_starting_apartments = GetResourceState("qb-apartments") ~= "missing" } ``` -------------------------------- ### startPlayerCustomization Source: https://docs.vipex.dev/paid-resources/appearance/exports Starts the player customization process. A callback function is executed upon completion, receiving appearance data or nil if canceled. ```APIDOC ## startPlayerCustomization(callback, config) ### Description Starts the player customization process, allowing players to modify their appearance. The callback is triggered once customization is complete, returning appearance data or nil if canceled. ### Parameters #### Callback - **callback** (function) - Receives `appearance` data if saved or `nil` if canceled. #### Config - **config** (table) - Configuration for customization options. Supported options include: - ped (boolean): Whether to allow ped customization. - headBlend (boolean): Whether to allow head blend customization. - faceFeatures (boolean): Whether to allow face features customization. - headOverlays (boolean): Whether to allow head overlays customization. - components (boolean): Whether to allow component customization. - props (boolean): Whether to allow prop customization. - allowExit (boolean): Whether to allow exiting customization. - tattoos (boolean): Whether to allow tattoo customization. ### Example ```lua exports['illenium-appearance']:startPlayerCustomization(function(appearance) if appearance then print('Customization saved!') else print('Customization canceled.') end end, { ped = true, headBlend = true, faceFeatures = true, headOverlays = true, components = true, props = true, allowExit = true, tattoos = true }) ``` ``` -------------------------------- ### QBCore Properties Apartment Support Check Source: https://docs.vipex.dev/paid-resources/multicharacter/config Checks if the 'qbx_properties' resource is available to determine support for starting apartments. ```lua return { support_starting_apartments = GetResourceState("qbx_properties") ~= "missing" } ``` -------------------------------- ### Ensure Resource Dependencies Source: https://docs.vipex.dev/paid-resources/appearance/install/esx Add these lines to your server.cfg to ensure the resource starts after its dependencies like ESX and ox_lib. ```cfg ensure es_extended ensure ox_lib ensure illenium-appearance ``` -------------------------------- ### Ensure Resources in server.cfg Source: https://docs.vipex.dev/paid-resources/multicharacter/install/qbcore Add these lines to your server.cfg file to ensure the resource starts correctly after your framework and oxmysql. ```cfg ensure oxmysql ensure qb-core ensure vx_multicharacter ``` -------------------------------- ### Get Department List Source: https://docs.vipex.dev/paid-resources/mdt/exports/server Retrieves a lightweight list of all departments. This data is cached. ```lua ---@return table[] Array of departments local departments = exports.vx_mdt:getDepartments() ``` -------------------------------- ### Blacklist Component for VIP Players Source: https://docs.vipex.dev/paid-resources/appearance/blacklist Example configuration in blacklist.lua to make a component accessible only to players with the 'vip' ACE. ```lua Config.Blacklist = { male = { components = { scarfAndChains = { { drawables = {5, 6, 7}, aces = {"vip"} -- Accessible only to VIP players } } } } } ``` -------------------------------- ### Configure QBX Core Client Settings Source: https://docs.vipex.dev/paid-resources/multicharacter/install/qbox Modify these settings in `qbx_core/config/client.lua`. Set `useExternalCharacters` to true for external system integration and `startingApartment` to false to disable default starting apartments. ```lua useExternalCharacters = true startingApartment = false ``` -------------------------------- ### Promote Player to Admin (Server Console) Source: https://docs.vipex.dev/paid-resources/mdt/admin-tools Examples of using the mdt_setadmin command with different target types and jobs. Ensure the job name matches your configuration. ```bash mdt_setadmin 1 police ``` ```bash mdt_setadmin license:abc123 police ``` ```bash mdt_setadmin AB12CD34 bcso ``` -------------------------------- ### Get All Charges Source: https://docs.vipex.dev/paid-resources/mdt/exports/server Retrieves all charges with their associated categories. This data is cached. ```lua ---@return table[] Array of charges local charges = exports.vx_mdt:getCharges() ``` -------------------------------- ### Start Player Customization Source: https://docs.vipex.dev/paid-resources/appearance/exports Initiates the player appearance customization process. The callback function is invoked upon completion, receiving appearance data or nil if canceled. Configuration options control which aspects of appearance can be modified. ```lua exports['illenium-appearance']:startPlayerCustomization(function(appearance) if appearance then print('Customization saved!') else print('Customization canceled.') end end, { ped = true, headBlend = true, faceFeatures = true, headOverlays = true, components = true, props = true, allowExit = true, tattoos = true }) ``` -------------------------------- ### ESX Database Cleanup Configuration Source: https://docs.vipex.dev/paid-resources/multicharacter/config Configure database cleanup and specify tables to be cleared when a character is deleted. Ensure the identifier_prefix matches your existing setup. ```lua return { identifier_prefix = "char", -- Make sure it matches whatever you had before, although the resource will attempt to auto detect this. database = { -- Toggle the deletion (this will wipe any table listed below for any deleted character) ---@type boolean cleanup = false, -- A list of tables that you wish to clean when they are deleted. ---@type table tables = { { name = 'users', column = 'identifier' }, { name = 'owned_vehicles', column = 'owner' }, -- { name = 'playerskins', column = 'citizenid' }, -- { name = 'player_outfits', column = 'citizenid' }, }, } } ``` -------------------------------- ### Get Ped Head Overlays Source: https://docs.vipex.dev/paid-resources/appearance/exports Fetches head overlay data, including makeup, scars, and blemishes, along with their opacity and color. Enables detailed facial customization. ```lua local headOverlays = exports['illenium-appearance']:getPedHeadOverlays(ped) print(headOverlays['blush'].opacity) ``` -------------------------------- ### Get Ped Components Source: https://docs.vipex.dev/paid-resources/appearance/exports Fetches the clothing and accessory components associated with a pedestrian's model. This includes items like shirts, pants, and shoes. ```lua local components = exports['illenium-appearance']:getPedComponents(ped) print(components[1].drawable) ``` -------------------------------- ### Get Officer Data by Source Source: https://docs.vipex.dev/paid-resources/mdt/exports/server Retrieves the officer data for an online player using their server source ID. Returns the staff record or nil if the player is not an officer or not found. ```lua ---@param source number Player server ID ---@return table|nil Staff record or nil local officer = exports.vx_mdt:getOfficerBySource(source) ``` -------------------------------- ### Set FiveManage API Key Convar Source: https://docs.vipex.dev/paid-resources/mdt/camera Add this convar to your `server.cfg` file to enable the camera system and link it to your FiveManage account. Replace 'your-api-key-here' with your actual FiveManage API key. ```cfg set vx_mdt:media "your-api-key-here" ``` -------------------------------- ### QBCore Starter Items Retrieval Source: https://docs.vipex.dev/paid-resources/multicharacter/config Retrieves starter items for QBCore, with a check for the 'qbx_core' resource. Handles potential errors during file loading and execution. ```lua --#region Modules local log = require("modules.utility.shared.logger") --#endregion ---@class IQboxCoreStarterItems ---@field name string ---@field amount integer ---@field metadata fun(client: integer): table ---@class IQboxSharedConfigResponse ---@field serverName string ---@field defaultSpawn vector4 ---@field notifyPosition string ---@field starterItems IQboxCoreStarterItems return { --- Gets the starter items. ---@return IQboxCoreStarterItems[] get_starter_items = function() if GetResourceState("qbx_core") == "missing" then log.warningf("[qbox::get_starter_items] `qbx_core` is missing, returning nothing.") return {} end local data = LoadResourceFile("qbx_core", "config/shared.lua") if not data then return {} end local success, result = pcall(load, data) if not success then log.warningf("[qbox::get_starter_items] Failed to load Lua code (Got - %s)", result) return {} end ---@type boolean, IQboxSharedConfigResponse? local execute_success, config_table = pcall(result --[[@as fun()]]) if not execute_success then log.warningf("[qbox::get_starter_items] Failed to execute Lua code (Got - %s)", config_table) return {} end if not config_table or not config_table.starterItems then log.warningf("[qbox::get_starter_items] No starter items found in config") return {} end return config_table.starterItems end, } ``` -------------------------------- ### General Configuration Settings Source: https://docs.vipex.dev/paid-resources/appearance/config Sets up general configuration options for the appearance system, including costs, UI preferences, and feature toggles. ```lua Config = {} Config.Debug = false Config.ClothingCost = 100 Config.BarberCost = 100 Config.TattooCost = 100 Config.SurgeonCost = 100 Config.DisableDataPanel = false -- You can completely disable the export panel & hide it. Config.UseNumericSystemForTattoos = false -- Instead of using the dropdown to select the tattoo, you use a number input just like the other values. Config.ChargePerTattoo = true -- Charge players per tattoo. Config.TattooCost will become the cost of 1 tattoo. The cost can be overridden by adding `cost` key in shared/tattoos.lua for specific tattoos -- Set this to true if you preferr using RCore Tattoos Config.RCoreTattoosCompatibility = false Config.UseTarget = false Config.TextUIOptions = { position = "right-center", } Config.NotifyOptions = { position = "top-right", } Config.OutfitCodeLength = 10 Config.UseRadialMenu = false Config.UseOxRadial = false -- Set to true to use ox_lib radial menu, both this and UseRadialMenu must be true Config.EnablePedsForShops = true Config.EnablePedsForClothingRooms = true Config.EnablePedsForPlayerOutfitRooms = true Config.EnablePedMenu = true Config.PedMenuGroup = "group.admin" Config.EnableJobOutfitsCommand = false -- Enables /joboutfits and /gangoutfits commands Config.ShowNearestShopOnly = false Config.HideRadar = false -- Hides the minimap while the appearance menu is open Config.NearestShopBlipUpdateDelay = 10000 Config.InvincibleDuringCustomization = true Config.PreventTrackerRemoval = false -- Disables "Scarf and Chains" section if the player has tracker Config.TrackerClothingOptions = { drawable = 13, texture = 0, } Config.NewCharacterSections = { Ped = true, HeadBlend = true, FaceFeatures = true, HeadOverlays = true, Components = true, Props = true, Tattoos = true, } Config.GenderBasedOnPed = true Config.AlwaysKeepProps = false Config.PersistUniforms = false -- Keeps Job / Gang Outfits on player reconnects / logout Config.OnDutyOnlyClothingRooms = false -- Set to `true` to make the clothing rooms accessible only to players who are On Duty Config.BossManagedOutfits = false -- Allows Job / Gang bosses to manage their own job / gang outfits Config.ReloadSkinCooldown = 5000 Config.AutomaticFade = false -- Enables automatic fading and disabled the Fade section from Hair Config.DisableComponents = { Masks = false, UpperBody = false, LowerBody = false, Bags = false, Shoes = false, ScarfAndChains = false, BodyArmor = false, Shirts = false, Decals = false, Jackets = false, } Config.DisableProps = { Hats = false, Glasses = false, Ear = false, Watches = false, Bracelets = false, } ---@type string[] Config.Aces = {} -- list of ace permissions used for blacklisting Config.Blips = { ["clothing"] = { Show = true, Sprite = 366, Color = 47, Scale = 0.7, Name = "Clothing Store", }, ["barber"] = { Show = true, Sprite = 71, Color = 0, Scale = 0.7, Name = "Barber", }, ["tattoo"] = { Show = true, Sprite = 75, Color = 4, Scale = 0.7, Name = "Tattoo Shop", }, ["surgeon"] = { Show = true, Sprite = 102, Color = 4, Scale = 0.7, Name = "Plastic Surgeon", }, } Config.TargetConfig = { ["clothing"] = { model = "s_f_m_shop_high", scenario = "WORLD_HUMAN_STAND_MOBILE", icon = "fas fa-tshirt", label = "Open Clothing Store", distance = 3, }, ["barber"] = { model = "s_m_m_hairdress_01", scenario = "WORLD_HUMAN_STAND_MOBILE", icon = "fas fa-scissors", label = "Open Barber Shop", distance = 3, }, ["tattoo"] = { model = "u_m_y_tattoo_01", scenario = "WORLD_HUMAN_STAND_MOBILE", icon = "fas fa-pen", label = "Open Tattoo Shop", distance = 3, }, ["surgeon"] = { model = "s_m_m_doctor_01", scenario = "WORLD_HUMAN_STAND_MOBILE", icon = "fas fa-scalpel", label = "Open Surgeon", distance = 3, }, ["clothingroom"] = { model = "mp_g_m_pros_01", scenario = "WORLD_HUMAN_STAND_MOBILE", icon = "fas fa-sign-in-alt", label = "Open Job / Gang Clothes Menu", distance = 3, }, ["playeroutfitroom"] = { model = "mp_g_m_pros_01", scenario = "WORLD_HUMAN_STAND_MOBILE", icon = "fas fa-sign-in-alt", label = "Open Outfits Menu", distance = 3, }, } Config.Stores = { { type = "clothing", coords = vector4(1693.2, 4828.11, 42.07, 188.66), size = vector3(4, 4, 4), rotation = 45, ``` -------------------------------- ### getProperty Source: https://docs.vipex.dev/paid-resources/mdt/exports/server Retrieves a property record by its unique ID. This function is used to get detailed information about a specific property. ```APIDOC ## getProperty(id) ### Description Get a property record by ID. ### Parameters #### Path Parameters - **id** (number) - Required - Property ID ### Response #### Success Response (table|nil) Returns the property record table if found, otherwise returns nil. ``` -------------------------------- ### Get Ped Props Source: https://docs.vipex.dev/paid-resources/appearance/exports Retrieves the props attached to a pedestrian, such as hats, glasses, or other accessories. Each prop has an associated ID. ```lua local props = exports['illenium-appearance']:getPedProps(ped) print(props[1].prop_id) ``` -------------------------------- ### Get Citizen Profile Source: https://docs.vipex.dev/paid-resources/mdt/exports/server Retrieves a complete citizen profile using their identifier. Returns the profile record or nil if not found. ```lua ---@param identifier string Citizen/state ID ---@return table|nil Profile record or nil local profile = exports.vx_mdt:getProfile(identifier) ``` -------------------------------- ### Add to Server Configuration Source: https://docs.vipex.dev/paid-resources/hudw/installation Add this line to your server.cfg file to ensure the resource is loaded. ```cfg ensure vipex_hudt ``` -------------------------------- ### Get Ped Model Source: https://docs.vipex.dev/paid-resources/appearance/exports Retrieves the model name of a given pedestrian entity. Useful for identifying the base model of a character. ```lua local pedModel = exports['illenium-appearance']:getPedModel(ped) print(pedModel) -- e.g. "mp_m_freemode_01" ``` -------------------------------- ### Enable ACE Permissions in server.cfg Source: https://docs.vipex.dev/paid-resources/appearance/blacklist Add this line to your server.cfg to allow the server to recognize ACE permissions. ```cfg add_ace resource.illenium-appearance command.list_aces allow ``` -------------------------------- ### Get Property Record Source: https://docs.vipex.dev/paid-resources/mdt/exports/server Retrieves a property record by its unique ID. Returns the property record table or nil if the ID is not found. ```lua ---@param id number Property ID ---@return table|nil Property record or nil local property = exports.vx_mdt:getProperty(1) ``` -------------------------------- ### Get Vehicle Record Source: https://docs.vipex.dev/paid-resources/mdt/exports/server Retrieves a complete vehicle record using its license plate. Returns the vehicle record or nil if not found. ```lua ---@param plate string Vehicle plate ---@return table|nil Vehicle record or nil local vehicle = exports.vx_mdt:getVehicle("ABC123") ``` -------------------------------- ### Full MDT Configuration Source: https://docs.vipex.dev/paid-resources/mdt/config This is the complete configuration file for vx_mdt. It includes settings for exports, bridges, forensics, evidence, vehicles, grade synchronization, caching, weapons, BOLOs, terminal, dispatch, radio, job masks, and departments. ```lua return { exportAllowlist = {}, bridges = { debug = false, framework = "", license = "", interaction = "", inventory = "", properties = "", billing = "", prison = "", garages = "", radar = "", camera = "", voice = "", }, forensics = { providerManaged = false, providers = { "r14-evidence", "framework" }, }, evidence = { allowStashIdEdit = true, }, vehicles = { autoLinkOwner = true, substringSearch = false, }, gradeSync = { enabled = false, syncOnLogin = true, syncLive = true, }, vehicleCache = { ttlSeconds = 5 * 24 * 60 * 60, minExpectedEntries = 100, }, weapons = { autoRegister = true, autoLinkOwner = true, }, bolos = { autoFlagRadar = true, syncOnStartup = false, }, terminal = { command = true, keybind = true, defaultKey = "K", }, dispatch = { globalOverlay = true, overlayKeybind = "F5", newCallNotifications = true, panicButton = true, panicKeybind = "F9", panicCooldown = 30, notificationDuration = 8000, exportAllowlist = {}, maxCallAge = 1800, maxCalls = 100, dispatchCompat = "", dispatchCompatExports = true, autoExpireAge = 86400, autoExpireCheckInterval = 60, autoDetection = { enabled = true, events = { gunshot = { enabled = true, cooldown = 15, priority = 2, weaponBlacklist = { "weapon_stungun", "weapon_flaregun", "weapon_flare", "weapon_snowball", "weapon_ball", "weapon_firework", "weapon_fireextinguisher", "weapon_petrolcan", "weapon_hazardcan", }, }, fight = { enabled = true, cooldown = 30, priority = 3 }, carjacking = { enabled = true, cooldown = 20, priority = 1 }, vehicleTheft = { enabled = true, cooldown = 30, priority = 2 }, explosion = { enabled = true, cooldown = 20, priority = 1 }, speeding = { enabled = true, cooldown = 45, speedThreshold = 130, priority = 3 }, }, }, fields = { plate = true, vehicleColor = true, speed = true, heading = true, suspect = true, owner = true, }, blips = { enabled = true, defaultSprite = 161, defaultColour = 1, defaultScale = 0.8, defaultOffset = 0, defaultRadius = 0, defaultRadiusColour = nil, defaultRadiusAlpha = 128, }, }, radio = { enabled = true, canUseRadio = function(srcNetId) return true end, }, jobMasks = { -- ["scammer"] = "Unemployed", }, departments = { ["police"] = { type = "law", title = "Los Santos Police Department", shortTitle = "LSPD", symbol = "#", accentColor = "#3b82f6", allowAccessOffDuty = false, defaultRadioFrequency = 1, defaultTags = GLOBAL.DEFAULTS.TAGS, defaultLicenses = GLOBAL.DEFAULTS.LICENSES, defaultCertificates = GLOBAL.DEFAULTS.CERTIFICATES, defaultTemplates = GLOBAL.DEFAULTS.TEMPLATES, defaultUnits = GLOBAL.DEFAULTS.UNITS, }, ["bcso"] = { type = "law", title = "Blaine County Sheriff's Office", shortTitle = "BCSO", symbol = "$", accentColor = "#F97316", allowAccessOffDuty = false, defaultRadioFrequency = 2, defaultTags = GLOBAL.DEFAULTS.TAGS, defaultLicenses = GLOBAL.DEFAULTS.LICENSES, defaultCertificates = GLOBAL.DEFAULTS.CERTIFICATES, defaultTemplates = GLOBAL.DEFAULTS.TEMPLATES, defaultUnits = GLOBAL.DEFAULTS.UNITS, }, ["sahp"] = { type = "law", title = "San Andreas Highway Patrol", shortTitle = "SAHP", symbol = "%", accentColor = "#f97316", allowAccessOffDuty = false, defaultRadioFrequency = 3, defaultTags = GLOBAL.DEFAULTS.TAGS, defaultLicenses = GLOBAL.DEFAULTS.LICENSES, defaultCertificates = GLOBAL.DEFAULTS.CERTIFICATES, defaultTemplates = GLOBAL.DEFAULTS.TEMPLATES, defaultUnits = GLOBAL.DEFAULTS.UNITS, }, ["ambulance"] = { type = "ems", title = "Los Santos Medical Services", shortTitle = "LSMS", symbol = "+", accentColor = "#22c55e", allowAccessOffDuty = false, defaultRadioFrequency = 4, defaultTags = GLOBAL.DEFAULTS.TAGS_EMS, defaultLicenses = GLOBAL.DEFAULTS.LICENSES, defaultCertificates = GLOBAL.DEFAULTS.CERTIFICATES, defaultTemplates = GLOBAL.DEFAULTS.TEMPLATES_EMS, defaultUnits = GLOBAL.DEFAULTS.UNITS_EMS, defaultMedicalConditionTypes = GLOBAL.DEFAULTS.MEDICAL_CONDITION_TYPES, }, ["judge"] = { type = "judge", ``` -------------------------------- ### Add to Server Configuration Source: https://docs.vipex.dev/paid-resources/hudy/installation Add this line to your server.cfg file to ensure the Hudys resource is loaded. ```cfg ensure vipex_hudls ``` -------------------------------- ### Get Ped Hair Source: https://docs.vipex.dev/paid-resources/appearance/exports Retrieves the hair data for a pedestrian, encompassing style, color, highlight, and texture. Essential for managing hairstyles. ```lua local hair = exports['illenium-appearance']:getPedHair(ped) print(hair.style) ``` -------------------------------- ### Theme Configuration Source: https://docs.vipex.dev/paid-resources/appearance/config Defines color palettes, background noise, gradients, shadows, and border radii for UI elements. Follows a specific format for colors. ```lua -- Make sure to follow the required format on colors for each section. return { -- Colors (HSL) ["background"] = "0 0% 6.7%", ["background-alt"] = "0 0% 11%", ["foreground"] = "0 0% 94.9%", ["foreground-alt"] = "0 0% 70.2%", ["muted"] = "240 5.9% 16.7%", ["muted-foreground"] = "0 0% 100% / 0.4", ["dark"] = "0 0% 96.1%", ["dark-04"] = "0 0% 96% / 0.4", ["dark-10"] = "0 0% 96% / 0.1", ["dark-40"] = "0 0% 96% / 0.04", ["accent"] = "201 88% 87%", ["destructive"] = "347 78% 60%", ["border"] = "0 0% 16.5%", ["border-alt"] = "0 0% 8.2%", -- Colors (HEX) ["text"] = "#dadada", ["text-alt"] = "#dadada95", ["icon"] = "#ffffff", -- Background Noise Config ["noise-deg"] = "0deg", ["noise-from-color"] = "#FFFFFF1A", ["noise-from-percentage"] = "0%", ["noise-to-color"] = "#FFFFFF1A", ["noise-to-percentage"] = "100%", --Gradient Values ["menu-gradient"] = "#111111", ["header-radial-gradient"] = "#262626, #0d0d0f", --Shadows ["shadow-mini"] = "0 0.25vmin 0 0.25vmin #0000004D", ["shadow-popover"] = "0 1.75vmin 3vmin 0.75vmin #0000004D", -- Border Radius ["none"] = "0", ["sm"] = "0.125vmin", ["DEFAULT"] = "0.25vmin", ["md"] = "0.675vmin", ["lg"] = "1vmin", ["xl"] = "1.55vmin", ["2xl"] = "2vmin", ["3xl"] = "2.5vmin", ["card"] = "1.6vmin", ["card-sm"] = "1.0vmin", ["card-lg"] = "2.0vmin", ["input"] = "0.9vmin", ["button"] = "1vmin", } ``` -------------------------------- ### Get Weapon Record Source: https://docs.vipex.dev/paid-resources/mdt/exports/server Retrieves a full weapon record using its serial number. Returns the weapon record table or nil if not found. ```lua ---@param serial string Weapon serial number ---@return table|nil Weapon record or nil local weapon = exports.vx_mdt:getWeapon("WPN-001") ``` -------------------------------- ### Get Dispatch Call by ID Source: https://docs.vipex.dev/paid-resources/mdt/dispatch Retrieves a specific dispatch call using its unique ID. Returns the call details or nil if not found. ```lua ---@param callId number Dispatch call ID ---@return table|nil Dispatch call or nil local call = exports.vx_mdt:getDispatchCall(callId) ``` -------------------------------- ### Run Full Database Migration Source: https://docs.vipex.dev/paid-resources/mdt/admin-tools Re-runs the full database migration pipeline from the server console. Useful for recovery scenarios or after manual database changes. This command only works from the server console and cannot be run by players in-game. ```bash mdt_runmigration ``` -------------------------------- ### Update fxmanifest.lua Source: https://docs.vipex.dev/paid-resources/appearance/install/esx Add a 'provides' section to your fxmanifest.lua to prevent conflicts with other ESX resources. ```lua provides({ "esx_skin", "skinchanger" }) ``` -------------------------------- ### Get Active Dispatch Calls Source: https://docs.vipex.dev/paid-resources/mdt/dispatch Retrieves all currently active dispatch calls. Can be optionally filtered by department type (e.g., 'law', 'ems', 'judge'). ```lua ---@param depType? string Optional: "law", "ems", or "judge" ---@return table[] Array of active dispatch calls local calls = exports.vx_mdt:getActiveDispatchCalls("law") ``` -------------------------------- ### Open MDT Terminal Source: https://docs.vipex.dev/paid-resources/mdt/exports/client Opens the MDT for the local player. This fires a server event that performs the full authorization flow, similar to the `/mdt` command. It is useful for item scripts where a player uses an item to access their tablet. ```lua exports.vx_mdt:openTerminal() ``` -------------------------------- ### Get Vehicle Fuel Level Source: https://docs.vipex.dev/paid-resources/hudw/config This function retrieves the current fuel level of a given vehicle. It requires a valid vehicle entity ID as input. ```lua return { ---Grabs the fuel level of the current vehicle. ---@param entVehicleId number ---@return number getFuel = function(entVehicleId) assert(entVehicleId, "[getFuel] invalid arg passed.") -- Logic Here. return 75 end } ``` -------------------------------- ### Enable MDT Dispatch Compatibility Mode Source: https://docs.vipex.dev/paid-resources/mdt/dispatch Set `dispatch.dispatchCompat` in your configuration to the name of a third-party dispatch resource to enable compatibility mode. This routes its calls into vx_mdt automatically. Supported values include "cd_dispatch", "cd_dispatch3d", "ps-dispatch", "rcore_dispatch", "fd_dispatch", or an empty string to disable. ```lua dispatch = { dispatchCompat = "cd_dispatch", }, ``` -------------------------------- ### Get Ped Face Features Source: https://docs.vipex.dev/paid-resources/appearance/exports Retrieves specific facial feature data for a pedestrian, such as nose width or cheekbone definition. Allows for fine-tuning facial structure. ```lua local faceFeatures = exports['illenium-appearance']:getPedFaceFeatures(ped) print(faceFeatures['noseWidth']) ``` -------------------------------- ### Get Ped Head Blend Source: https://docs.vipex.dev/paid-resources/appearance/exports Fetches the head blend data for a pedestrian, which defines facial shape and skin tone mixing. This is crucial for character morphing. ```lua local headBlend = exports['illenium-appearance']:getPedHeadBlend(ped) print(headBlend.shapeFirst) ``` -------------------------------- ### openTerminal Source: https://docs.vipex.dev/paid-resources/mdt/exports/client Opens the MDT for the local player. This fires a server event that runs the full authorization flow, similar to the /mdt command. It is useful for item scripts where a player uses an item to open their tablet. ```APIDOC ## openTerminal() ### Description Open the MDT for the local player. Fires a server event that runs the full authorization flow (same as `/mdt`). Useful for item scripts where the player uses an item to open their tablet. ### Method exports.vx_mdt:openTerminal() ### Parameters None ### Request Example None ### Response None ``` -------------------------------- ### Get Ped Appearance Source: https://docs.vipex.dev/paid-resources/appearance/exports Fetches the complete appearance object for a pedestrian, consolidating all customizable attributes into a single table. Useful for saving or loading full character profiles. ```lua local appearance = exports['illenium-appearance']:getPedAppearance(ped) print(appearance.model) ``` -------------------------------- ### MDT Set Admin Command Syntax Source: https://docs.vipex.dev/paid-resources/mdt/admin-tools Use this command in the server console to promote a player to a department admin. Specify the target player and their job. ```bash mdt_setadmin ``` -------------------------------- ### Define Player Outfit Room Configuration Source: https://docs.vipex.dev/paid-resources/appearance/config A commented-out sample configuration for a player outfit room, including job, coordinates, size, rotation, collision points, and citizen IDs. ```lua -- Sample outfit room config --[[{ job = "police", coords = vector4(287.28, -573.41, 43.16, 79.61), size = vector3(4, 4, 4), rotation = 45, usePoly = false, points = { vector3(284.83, -574.01, 43.16), vector3(286.33, -570.03, 43.16), vector3(290.33, -571.74, 43.16), vector3(289.0, -574.75, 43.16) }, citizenIDs = { "BHH65156" } }]] -- ``` -------------------------------- ### getDepartments() Source: https://docs.vipex.dev/paid-resources/mdt/exports/server Returns a lightweight department list. ```APIDOC ## getDepartments() ### Description Returns a lightweight department list. ### Returns - `table[]`: Array of departments ``` -------------------------------- ### Configure Export Allowlist Source: https://docs.vipex.dev/paid-resources/mdt/config Restricts which resources can call MDT server exports. An empty table allows all resources. ```lua exportAllowlist = { "my-resource", "another-resource" }, ``` -------------------------------- ### Get Officer Record Source: https://docs.vipex.dev/paid-resources/mdt/exports/server Retrieves an officer's data, including their permissions. Requires the officer's identifier and department ID. Returns the staff record or nil if not found. ```lua ---@param identifier string Citizen/state ID ---@param depId number Department ID ---@return table|nil Staff record or nil local officer = exports.vx_mdt:getOfficer(identifier, depId) ``` -------------------------------- ### Create Weapon Record Source: https://docs.vipex.dev/paid-resources/mdt/exports/server Creates a weapon record if it does not already exist. Requires weapon serial and optional model and owner data. ```lua ---@param serial string Weapon serial number ---@param data { model?: string, owner?: string, source?: number } ---@return boolean local success = exports.vx_mdt:createWeapon("WPN-001", { model = "WEAPON_PISTOL", owner = "ABC12345", }) ``` -------------------------------- ### Blacklist Configuration Source: https://docs.vipex.dev/paid-resources/appearance/config Defines default empty tables for blacklisting items for male and female characters, categorized by components and props. ```lua Config.Blacklist = { male = { hair = {}, components = { masks = {}, upperBody = {}, lowerBody = {}, bags = {}, shoes = {}, scarfAndChains = {}, shirts = {}, bodyArmor = {}, decals = {}, jackets = {}, }, props = { hat = {}, glasses = {}, ear = {}, watches = {}, bracelets = {}, }, }, female = { hair = {}, components = { masks = {}, upperBody = {}, lowerBody = {}, bags = {}, shoes = {}, scarfAndChains = {}, shirts = {}, bodyArmor = {}, decals = {}, jackets = {}, }, props = { hat = {}, glasses = {}, ear = {}, watches = {}, bracelets = {}, }, }, } ``` -------------------------------- ### Remove QB-Clothing Dependency Source: https://docs.vipex.dev/paid-resources/appearance/install/qbcore Modify the fxmanifest.lua in qb-houses and qb-apartments to remove the qb-clothing dependency. ```lua dependencies { 'qb-core', 'qb-vehicles', - 'qb-clothing', 'qb-interior' } ``` -------------------------------- ### Create a New Dispatch Call Source: https://docs.vipex.dev/paid-resources/mdt/dispatch Use `createDispatchCall` to log a new incident. Optionally configure map blips and add structured data fields for enhanced detail. ```lua ---@param data { dep_type: string, call_type: string, title: string, description?: string, location_text?: string, priority?: number, metadata?: table, coords?: vector3, radio_frequency?: number, author_name?: string, author_identifier?: string, blip?: table|false, fields?: table[] } ---@return { id: number }|{ error: string } local result = exports.vx_mdt:createDispatchCall({ dep_type = "law", call_type = "10-31", title = "Robbery in Progress", description = "Armed robbery at Fleeca Bank", location_text = "Fleeca Bank, Route 68", priority = 1, coords = vector3(311.6, -278.6, 54.2), blip = { sprite = 161, -- GTA blip sprite (default from config) colour = 1, -- GTA blip colour (default from config) scale = 0.8, -- blip scale (default from config) duration = 60, -- seconds before auto-removing (0 = until call ends) flash = true, -- flash the blip (default: auto for P0/P1) text = "Robbery", -- blip label (default: call title) offset = 50, -- random offset in world units (0 = exact, default from config) radius = 100, -- radius circle overlay in world units (0 = none, default from config) radius_colour = 1, -- radius circle colour (default: blip colour) radius_alpha = 128, -- radius circle transparency 0-255 (default from config) }, fields = { { type = "plate", value = "ABC123" }, { type = "vehicle", value = "Sultan", data = "ABC123" }, { type = "color", value = "Red", data = "27" }, { type = "speed", value = "142" }, { type = "person", value = "John Smith", data = "ABC12345" }, { label = "WEAPON", value = "AK-47" }, }, }) ``` -------------------------------- ### Enable ACE Permissions in shared/config.lua Source: https://docs.vipex.dev/paid-resources/appearance/blacklist Set Config.EnableACEPermissions to true in shared/config.lua to activate ACE permission handling. ```lua Config.EnableACEPermissions = true ``` -------------------------------- ### HUDW Shared Configuration Source: https://docs.vipex.dev/paid-resources/hudw/config Configure language, framework, UI component visibility, and map zoom levels. This file allows for extensive customization of the HUD's behavior and appearance. ```lua return { language = "en", -- You have to setup your own locale in `locales/**` and make sure the file name matches this string, framework = "none", -- esx, qb, qbox, ox, nd, custom, none disableAutoDetection = false, -- Set to true if you wanna disable the auto framework & fuel resource detection. displayMinimapOnFoot = false, -- This could also be an option in the settings panel, although i'm unsure if people would want that since some servers want it forced off. hiddenUIComponents = { 3, -- Cash 6, -- Vehicle Name 7, -- Area Name 8, -- Vehicle Class 9 -- Street Name }, useMapCustomZoomLevels = false, -- Enable if you wanna use your own custom zoom levels, the ones defined in `mapZoomLevels` mapZoomLevels = { { index = 1, zoomScale = 2.7999999523163, zoomSpeed = 0.89999997615814, scrollSpeed = 0.079999998211861, tilesX = 0.0, tilesY = 0.0 }, { index = 2, zoomScale = 8.0, zoomSpeed = 0.89999997615814, scrollSpeed = 0.079999998211861, tilesX = 0.0, tilesY = 0.0 }, { index = 3, zoomScale = 11.0, zoomSpeed = 0.89999997615814, scrollSpeed = 0.079999998211861, tilesX = 0.0, tilesY = 0.0 }, { index = 4, zoomScale = 16.0, zoomSpeed = 0.89999997615814, scrollSpeed = 0.079999998211861, tilesX = 0.0, tilesY = 0.0 }, { index = 5, zoomScale = 55.0, zoomSpeed = 0.0, scrollSpeed = 0.10000000149012, tilesX = 2.0, tilesY = 1.0 }, }, seatbeltEjectionValues = { ejectVelocity = (1 / 2.236936), unknownEjectVelocity = (2 / 2.236936), unknownModifier = 17.0, minDamage = 0.0, } } ``` -------------------------------- ### Clothing Store Configuration Source: https://docs.vipex.dev/paid-resources/appearance/config Defines a clothing store entity with its coordinates, size, rotation, and polygon points. ```lua { type = "clothing", coords = vector4(124.82, -224.36, 54.56, 335.41), size = vector3(4, 4, 4), rotation = 45, usePoly = false, points = { vector3(133.60948181152, -210.31390380859, 54.56), vector3(125.8349609375, -228.48097229004, 54.56), vector3(116.3140335083, -225.02020263672, 54.56), vector3(122.56930541992, -207.83396911621, 54.56), }, } ``` -------------------------------- ### Assign Multiple Players to VIP Role Source: https://docs.vipex.dev/paid-resources/appearance/blacklist Assign multiple players to the 'vip' role by repeating the add_principal command for each player's license. ```cfg add_principal identifier.license:abc123 group.vip add_principal identifier.license:def456 group.vip add_principal identifier.license:ghi789 group.vip ``` -------------------------------- ### onDispatch Source: https://docs.vipex.dev/paid-resources/mdt/dispatch Registers a callback function to listen for specific dispatch events. This enables real-time integration with external systems. ```APIDOC ## onDispatch(event, handler) ### Description Register a listener for dispatch events. ### Parameters #### Path Parameters - **event** (string) - Required - "created"|"updated"|"deleted"|"attached"|"detached"|"completed"|"cancelled" - **handler** (function) - Required - Callback receiving event data ### Response #### Success Response (200) - **id** (number) - Listener ID for cleanup - **error** (string) - Error message if registration fails ### Response Example ```json { "example": "local result = exports.vx_mdt:onDispatch(\"created\", function(call) print(\"New dispatch call:\", call.title) end) local listenerId = result.id" } ``` ### Method exports.vx_mdt:onDispatch(event, handler) ``` -------------------------------- ### Add HUDT to Server Configuration Source: https://docs.vipex.dev/paid-resources/hudt/installation Add this line to your server.cfg file to ensure the HUDT resource is loaded. ```cfg ensure vipex-hudt ``` -------------------------------- ### Create VIP ACE Role in server.cfg Source: https://docs.vipex.dev/paid-resources/appearance/blacklist Define a new ACE role named 'vip' in your server.cfg. ```cfg add_ace group.vip vip allow ```