Price
$10.00A script by AmiRobin
Price
$10.00Welcome to ARS ICLOTHING! This script allows you to manage clothing as items within your inventory. With ARS ICLOTHING, you can easily equip and remove clothing items, as well as interact with other players’ clothing through commands like chainsnatch.
To install ARS ICLOTHING, follow these steps:
ars_iclothing folder into your server’s resources directory.ensure ars_iclothing to your server.cfg.config.lua as needed.images folder in your inventory directory.Use the coupon code 10-OFF and get $10 off your first subscription month.
AmiRobin | (tebex.io)
ARS ICLOTHING ESX | (tebex.io)
ARS ICLOTHING QB | (tebex.io)
ARS ICLOTHING requires the following dependencies:
Here are some of the scripts I offer:
To make a cloths as a item you need to make a some configuration ars_iclothing/preset/ folder. you can copy a existing preset and change the values as you need.
If clothing remains on the player after removing the item from the inventory, add the following code to your inventory script:
TriggerClientEvent('esx:removeInventoryItem', source, itemname, count) -- for ESX
TriggerClientEvent('QBCore:Client:OnRemoveInventoryItem', source, itemname, count) -- for QBCore
Note: Use only the appropriate line for your framework.
If clothing remains on the player after wearing it, and they do not have the item in their inventory, add the following code to your skin menu script:
Action: find a server event that triggers when the player changes their skin and add the following code:
TriggerClientEvent('ars_iclothing:client:reloadClothing', source)
No additional configuration needed; it is already supported.
No additional configuration needed; it is already supported.
No additional configuration needed; it is already supported.
No additional configuration needed; it is already supported.
No additional configuration needed; it is already supported.
Path: ox_inventory\client.lua
Action: Replace the following code:
if shared.framework == 'esx' then
TriggerEvent('esx:removeInventoryItem', item.name, item.count)
end
with:
if shared.framework == 'esx' then
TriggerEvent('esx:removeInventoryItem', item.name, item.count)
elseif shared.framework == 'qb' then
TriggerEvent('QBCore:Client:OnRemoveInventoryItem', item.name, item.count)
end
Path: qb-inventory/server/functions.lua
Action: Replace the RemoveItem function with the following code:
function RemoveItem(identifier, item, amount, slot, reason)
if not QBCore.Shared.Items[item:lower()] then
DebugPrint('RemoveItem: Invalid item')
return false
end
local inventory
local player = QBCore.Functions.GetPlayer(identifier)
if player then
inventory = player.PlayerData.items
elseif Inventories[identifier] then
inventory = Inventories[identifier].items
elseif Drops[identifier] then
inventory = Drops[identifier].items
end
if not inventory then
DebugPrint('RemoveItem: Inventory not found')
return false
end
slot = tonumber(slot) or GetFirstSlotByItem(inventory, item)
if not slot then
DebugPrint('RemoveItem: Slot not found')
return false
end
local inventoryItem = inventory[slot]
if not inventoryItem or inventoryItem.name:lower() ~= item:lower() then
DebugPrint('RemoveItem: Item not found in slot')
return false
end
amount = tonumber(amount)
if inventoryItem.amount < amount then
DebugPrint('RemoveItem: Not enough items in slot')
return false
end
inventoryItem.amount = inventoryItem.amount - amount
if inventoryItem.amount <= 0 then
inventory[slot] = nil
end
if player then player.Functions.SetPlayerData('items', inventory) end
local invName = player and GetPlayerName(identifier) .. ' (' .. identifier .. ')' or identifier
local removeReason = reason or 'No reason specified'
local resourceName = GetInvokingResource() or 'qb-inventory'
TriggerEvent(
'qb-log:server:CreateLog',
'playerinventory',
'Item Removed',
'red',
'**Inventory:** ' .. invName .. ' (Slot: ' .. slot .. ')\n' ..
'**Item:** ' .. item .. '\n' ..
'**Amount:** ' .. amount .. '\n' ..
'**Reason:** ' .. removeReason .. '\n' ..
'**Resource:** ' .. resourceName
)
-- add this line for ars_iclothing
if player then
TriggerClientEvent('QBCore:Client:OnRemoveInventoryItem', player.PlayerData.source, item)
end
return true
end
Path: qb-inventory/server/main.lua
Action: Replace the RemoveItem function with the following code:
local function RemoveItem(source, item, amount, slot)
local Player = QBCore.Functions.GetPlayer(source)
if not Player then return false end
amount = tonumber(amount) or 1
slot = tonumber(slot)
if slot then
if Player.PlayerData.items[slot].amount > amount then
Player.PlayerData.items[slot].amount = Player.PlayerData.items[slot].amount - amount
Player.Functions.SetPlayerData("items", Player.PlayerData.items)
if not Player.Offline then
TriggerEvent('qb-log:server:CreateLog', 'playerinventory', 'RemoveItem', 'red', '**' .. GetPlayerName(source) .. ' (citizenid: ' .. Player.PlayerData.citizenid .. ' | id: ' .. source .. ')** lost item: [slot:' .. slot .. '], itemname: ' .. Player.PlayerData.items[slot].name .. ', removed amount: ' .. amount .. ', new total amount: ' .. Player.PlayerData.items[slot].amount)
end
TriggerEvent('QBCore:Client:OnRemoveInventoryItem', source, item)
return true
elseif Player.PlayerData.items[slot].amount == amount then
Player.PlayerData.items[slot] = nil
Player.Functions.SetPlayerData("items", Player.PlayerData.items)
if Player.Offline then return true end
TriggerEvent('qb-log:server:CreateLog', 'playerinventory', 'RemoveItem', 'red', '**' .. GetPlayerName(source) .. ' (citizenid: ' .. Player.PlayerData.citizenid .. ' | id: ' .. source .. ')** lost item: [slot:' .. slot .. '], itemname: ' .. item .. ', removed amount: ' .. amount .. ', item removed')
-- add this line for ars_iclothing
TriggerClientEvent('QBCore:Client:OnRemoveInventoryItem', source, item)
return true
end
else
local slots = GetSlotsByItem(Player.PlayerData.items, item)
local amountToRemove = amount
if not slots then return false end
for _, _slot in pairs(slots) do
if Player.PlayerData.items[_slot].amount > amountToRemove then
Player.PlayerData.items[_slot].amount = Player.PlayerData.items[_slot].amount - amountToRemove
Player.Functions.SetPlayerData("items", Player.PlayerData.items)
if not Player.Offline then
TriggerEvent('qb-log:server:CreateLog', 'playerinventory', 'RemoveItem', 'red', '**' .. GetPlayerName(source) .. ' (citizenid: ' .. Player.PlayerData.citizenid .. ' | id: ' .. source .. ')** lost item: [slot:' .. _slot .. '], itemname: ' .. Player.PlayerData.items[_slot].name .. ', removed amount: ' .. amount .. ', new total amount: ' .. Player.PlayerData.items[_slot].amount)
end
TriggerEvent('QBCore:Client:OnRemoveInventoryItem', source, item)
return true
elseif Player.PlayerData.items[_slot].amount == amountToRemove then
Player.PlayerData.items[_slot] = nil
Player.Functions.SetPlayerData("items", Player.PlayerData.items)
if Player.Offline then return true end
TriggerEvent('qb-log:server:CreateLog', 'playerinventory', 'RemoveItem', 'red', '**' .. GetPlayerName(source) .. ' (citizenid: ' .. Player.PlayerData.citizenid .. ' | id: ' .. source .. ')** lost item: [slot:' .. _slot .. '], itemname: ' .. item .. ', removed amount: ' .. amount .. ', item removed')
-- add this line for ars_iclothing
TriggerClientEvent('QBCore:Client:OnRemoveInventoryItem', source, item)
return true
end
end
end
return false
end
Thanks to:
| Code is accessible | Partial |
| Subscription-based | Yes |
| One time purchase | Yes |
| Requirements | ESX or QB |
| Support | Yes |
| Escrowed | Yes |
See what others are saying about this script.
Share your experience and help others.