mirror of
https://github.com/esx-framework/esx_core.git
synced 2026-09-04 16:23:21 +00:00
Fix message pack Error
This commit is contained in:
+8
-6
@@ -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)
|
||||
|
||||
Reference in New Issue
Block a user