Removing saved clothes

Credits to Eden server
This commit is contained in:
LuaDeldu
2017-12-01 20:20:45 +01:00
parent 2d7485a6d2
commit f5bfd82d75
4 changed files with 55 additions and 0 deletions
+23
View File
@@ -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(