Corrected trigger names

This commit is contained in:
ElPumpo
2018-04-09 12:30:33 +02:00
parent e02629fa4e
commit e9f34c5d31
2 changed files with 10 additions and 10 deletions
+4 -4
View File
@@ -19,7 +19,7 @@ AddEventHandler('onMySQLReady', function()
end)
ESX.RegisterServerCallback('esx_shop:requestDBItems', function(source, cb)
ESX.RegisterServerCallback('esx_shops:requestDBItems', function(source, cb)
MySQL.Async.fetchAll(
'SELECT * FROM shops',
@@ -43,11 +43,11 @@ ESX.RegisterServerCallback('esx_shop:requestDBItems', function(source, cb)
end)
RegisterServerEvent('esx_shop:buyItem')
AddEventHandler('esx_shop:buyItem', function(itemName, price)
RegisterServerEvent('esx_shops:buyItem')
AddEventHandler('esx_shops:buyItem', function(itemName, price)
local _source = source
local xPlayer = ESX.GetPlayerFromId(_source)
local xPlayer = ESX.GetPlayerFromId(_source)
local sourceItem = xPlayer.getInventoryItem(itemName)
-- can the player afford this item?