Fix message pack Error

This commit is contained in:
Unknown
2018-02-22 01:54:10 +01:00
parent 10c6203565
commit c4afb5e054
+8 -6
View File
@@ -5,7 +5,8 @@ TriggerEvent('esx:getSharedObject', function(obj) ESX = obj end)
RegisterServerEvent('esx_clotheshop:pay')
AddEventHandler('esx_clotheshop:pay', function()
local xPlayer = ESX.GetPlayerFromId(source)
local _source = source
local xPlayer = ESX.GetPlayerFromId(_source)
xPlayer.removeMoney(Config.Price)
@@ -16,8 +17,8 @@ end)
RegisterServerEvent('esx_clotheshop:saveOutfit')
AddEventHandler('esx_clotheshop:saveOutfit', function(label, skin)
local xPlayer = ESX.GetPlayerFromId(source)
local _source = source
local xPlayer = ESX.GetPlayerFromId(_source)
TriggerEvent('esx_datastore:getDataStore', 'property', xPlayer.identifier, function(store)
local dressing = store.get('dressing')
@@ -39,8 +40,8 @@ end)
ESX.RegisterServerCallback('esx_clotheshop:checkMoney', function(source, cb)
local xPlayer = ESX.GetPlayerFromId(source)
local _source = source
local xPlayer = ESX.GetPlayerFromId(_source)
if xPlayer.get('money') >= Config.Price then
cb(true)
else
@@ -51,7 +52,8 @@ end)
ESX.RegisterServerCallback('esx_clotheshop:checkPropertyDataStore', function(source, cb)
local xPlayer = ESX.GetPlayerFromId(source)
local _source = source
local xPlayer = ESX.GetPlayerFromId(_source)
local foundStore = false
TriggerEvent('esx_datastore:getDataStore', 'property', xPlayer.identifier, function(store)