mirror of
https://github.com/esx-framework/esx_core.git
synced 2026-09-01 02:38:53 +00:00
Removing saved clothes
Credits to Eden server
This commit is contained in:
@@ -518,6 +518,29 @@ ESX.RegisterServerCallback('esx_property:getPlayerOutfit', function(source, cb,
|
||||
|
||||
end)
|
||||
|
||||
RegisterServerEvent('esx_property:removeOutfit')
|
||||
AddEventHandler('esx_property:removeOutfit', function(label)
|
||||
|
||||
local xPlayer = ESX.GetPlayerFromId(source)
|
||||
|
||||
TriggerEvent('esx_datastore:getDataStore', 'property', xPlayer.identifier, function(store)
|
||||
|
||||
local dressing = store.get('dressing')
|
||||
|
||||
if dressing == nil then
|
||||
dressing = {}
|
||||
end
|
||||
|
||||
label = label
|
||||
|
||||
table.remove(dressing, label)
|
||||
|
||||
store.set('dressing', dressing)
|
||||
|
||||
end)
|
||||
|
||||
end)
|
||||
|
||||
function PayRent(d, h, m)
|
||||
|
||||
MySQL.Async.fetchAll(
|
||||
|
||||
Reference in New Issue
Block a user