Exports & Events
Here you will find everything you need to work
Exports:
Use it for when they just enter the server and you need to have everything available to customize and at the same time be free
-- @return true when the firstcustomization is done
local result = exports['dx_clothing']:StartFirstCustomization()
You can open the menus
-- @param type 'firstcustom' | 'clothing' | 'barber' | 'tattoos'
exports['dx_clothing']:StartCustomization(type)
To open the outfits menu
-- @param IsInStore boolean Will allow to create and delete outfits
exports['dx_clothing']:OpenOutfitMenu(IsInStore)
--@param IsInStore if is true then can't return to the main menu but
-- if is false then can return to the main menu
exports['dx_clothing']:openJobsOutfitMenu(IsInStore)
To set ped appearance
-- @param ped number The entity player.
-- @param data string The appearance data to apply to the player character.
exports['dx_clothing']:setPedAppearance(ped, data)
To set player model
-- @param skin string
local skin = 'mp_m_freemode_01'
exports['dx_clothing']:setPlayerModel(skin)
Events
To load skin model by JSON
-- @param skin string The appearance data to apply to the current player character.
TriggerEvent('dx_clothing:loadSkin', skin) --skin alway needs to be string objet
To set ped appearance
-- @param ped number The entity player.
-- @param data string The appearance data to apply to the player character.
TriggerEvent('dx_clothing:setPedAppearance', ped, data)
To reload current character tattoos you can use:
TriggerEvent('dx_clothing:load:pedTattoos')
Event Handlers
AddEventHandler('dx_clothing:onclose', function()
print('Clothing menu closed')
end)
AddEventHandler('dx_clothing:on:save', function(paymentType, price, playerApearance)
print('Payment type: ' .. paymentType)
print('Price: ' .. price)
print('Player apearance: ' .. json.encode(playerApearance, {indent = true}))
end)
Last updated