Advertisement
seishin77

Untitled

Jun 8th, 2019
300
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 18.62 KB | None | 0 0
  1. AddEventHandler('es:playerLoaded', function(source, _player)
  2.  
  3.   local _source = source
  4.   local tasks   = {}
  5.   local tasks2   = {}
  6.  
  7.   local userData = {
  8.     accounts     = {},
  9.     inventory    = {},
  10.     job          = {},
  11.     job2          = {},
  12.     loadout      = {},
  13.     playerName   = GetPlayerName(_source),
  14.     lastPosition = nil
  15.   }
  16.  
  17.     TriggerEvent('es:getPlayerFromId', _source, function(player)
  18.         -- Update user name in DB
  19.         table.insert(tasks, function(cb)
  20.             MySQL.Async.execute('UPDATE `users` SET `name` = @name WHERE `identifier` = @identifier', {
  21.                 ['@identifier'] = player.getIdentifier(),
  22.                 ['@name'] = userData.playerName
  23.             }, function(rowsChanged)
  24.                 cb()
  25.             end)
  26.         end)
  27.  
  28.         -- Get accounts
  29.         table.insert(tasks, function(cb)
  30.             MySQL.Async.fetchAll('SELECT * FROM `user_accounts` WHERE `identifier` = @identifier', {
  31.                 ['@identifier'] = player.getIdentifier()
  32.             }, function(accounts)
  33.                 for i=1, #Config.Accounts, 1 do
  34.                     for j=1, #accounts, 1 do
  35.                         if accounts[j].name == Config.Accounts[i] then
  36.                             table.insert(userData.accounts, {
  37.                                 name  = accounts[j].name,
  38.                                 money = accounts[j].money,
  39.                                 label = Config.AccountLabels[accounts[j].name]
  40.                             })
  41.                         end
  42.  
  43.                         break
  44.                     end
  45.                 end
  46.  
  47.                 cb()
  48.             end)
  49.         end)
  50.  
  51.         -- Get inventory
  52.         table.insert(tasks, function(cb)
  53.  
  54.             MySQL.Async.fetchAll('SELECT * FROM `user_inventory` WHERE `identifier` = @identifier', {
  55.                 ['@identifier'] = player.getIdentifier()
  56.             }, function(inventory)
  57.                 local tasks2 = {}
  58.  
  59.                 for i=1, #inventory do
  60.                     local item = ESX.Items[inventory[i].item]
  61.  
  62.                     if item then
  63.                         table.insert(userData.inventory, {
  64.                             name = inventory[i].item,
  65.                             count = inventory[i].count,
  66.                             label = item.label,
  67.                             limit = item.limit,
  68.                             usable = ESX.UsableItemsCallbacks[inventory[i].item] ~= nil,
  69.                             rare = item.rare,
  70.                             canRemove = item.canRemove
  71.                         })
  72.                     else
  73.                         print(('es_extended: invalid item "%s" ignored!'):format(inventory[i].item))
  74.                     end
  75.                 end
  76.  
  77.                 for k,v in pairs(ESX.Items) do
  78.                     local found = false
  79.  
  80.                     for j=1, #userData.inventory do
  81.                         if userData.inventory[j].name == k then
  82.                             found = true
  83.                             break
  84.                         end
  85.                     end
  86.  
  87.                     if not found then
  88.                         table.insert(userData.inventory, {
  89.                             name = k,
  90.                             count = 0,
  91.                             label = ESX.Items[k].label,
  92.                             limit = ESX.Items[k].limit,
  93.                             usable = ESX.UsableItemsCallbacks[k] ~= nil,
  94.                             rare = ESX.Items[k].rare,
  95.                             canRemove = ESX.Items[k].canRemove
  96.                         })
  97.  
  98.                         local scope = function(item, identifier)
  99.                             table.insert(tasks2, function(cb2)
  100.                                 MySQL.Async.execute('INSERT INTO user_inventory (identifier, item, count) VALUES (@identifier, @item, @count)', {
  101.                                     ['@identifier'] = identifier,
  102.                                     ['@item'] = item,
  103.                                     ['@count'] = 0
  104.                                 }, function(rowsChanged)
  105.                                     cb2()
  106.                                 end)
  107.                             end)
  108.                         end
  109.  
  110.                         scope(k, player.getIdentifier())
  111.                     end
  112.  
  113.                 end
  114.  
  115.                 Async.parallelLimit(tasks2, 5, function(results) end)
  116.  
  117.                 table.sort(userData.inventory, function(a,b)
  118.                     return a.label < b.label
  119.                 end)
  120.  
  121.                 cb()
  122.             end)
  123.  
  124.         end)
  125.  
  126. -- Get job and loadout
  127.     table.insert(tasks, function(cb)
  128.  
  129.       local tasks2 = {}
  130.  
  131.       -- Get job name, grade and last position
  132.       table.insert(tasks2, function(cb2)
  133.  
  134.         MySQL.Async.fetchAll(
  135.           'SELECT * FROM `users` WHERE `identifier` = @identifier',
  136.           {
  137.             ['@identifier'] = player.getIdentifier()
  138.           },
  139.           function(result)
  140.  
  141.             userData.job['name']  = result[1].job
  142.             userData.job2['name']  = result[1].job2
  143.             userData.job['grade'] = result[1].job_grade
  144.             userData.job2['grade'] = result[1].job2_grade
  145.  
  146.             if result[1].loadout ~= nil then
  147.               userData.loadout = json.decode(result[1].loadout)
  148.             end
  149.  
  150.             if result[1].position ~= nil then
  151.               userData.lastPosition = json.decode(result[1].position)
  152.             end
  153.  
  154.             cb2()
  155.  
  156.           end
  157.         )
  158.  
  159.       end)
  160.  
  161. -- Run Tasks
  162.     Async.parallel(tasks, function(results)
  163.  
  164.       local xPlayer = CreateExtendedPlayer(player, userData.accounts, userData.inventory, userData.job, userData.job2, userData.loadout, userData.playerName, userData.lastPosition)
  165.  
  166.       xPlayer.getMissingAccounts(function(missingAccounts)
  167.  
  168.         if #missingAccounts > 0 then
  169.  
  170.           for i=1, #missingAccounts, 1 do
  171.             table.insert(xPlayer.accounts, {
  172.               name  = missingAccounts[i],
  173.               money = 0,
  174.               label = Config.AccountLabels[missingAccounts[i]]
  175.             })
  176.           end
  177.  
  178.           xPlayer.createAccounts(missingAccounts)
  179.         end
  180.  
  181.         ESX.Players[_source] = xPlayer
  182.  
  183.         TriggerEvent('esx:playerLoaded', _source)
  184.  
  185.         TriggerClientEvent('esx:playerLoaded', _source, {
  186.           identifier   = xPlayer.identifier,
  187.           accounts     = xPlayer.getAccounts(),
  188.           inventory    = xPlayer.getInventory(),
  189.           job          = xPlayer.getJob(),
  190.           job2          = xPlayer.getJob2(),
  191.           loadout      = xPlayer.getLoadout(),
  192.           lastPosition = xPlayer.getLastPosition(),
  193.           money        = xPlayer.get('money')
  194.         })
  195.  
  196.         xPlayer.player.displayMoney(xPlayer.get('money'))
  197.  
  198.       end)
  199.  
  200.     end)
  201.  
  202.   end)
  203.  
  204. end)
  205.  
  206.  table.insert(tasks2, function(cb2)
  207.  
  208.         MySQL.Async.fetchAll(
  209.           'SELECT * FROM `jobs` WHERE `name` = @name',
  210.           {
  211.             ['@name'] = userData.job.name
  212.           },
  213.           function(result)
  214.  
  215.             userData.job['label'] = result[1].label
  216.  
  217.             cb2()
  218.  
  219.           end
  220.         )
  221.  
  222.       end)
  223.       -- Get job2 label
  224.       table.insert(tasks2, function(cb2)
  225.  
  226.         MySQL.Async.fetchAll(
  227.           'SELECT * FROM `jobs` WHERE `name` = @name',
  228.           {
  229.             ['@name'] = userData.job2.name
  230.           },
  231.           function(result)
  232.  
  233.             userData.job2['label'] = result[1].label
  234.  
  235.             cb2()
  236.  
  237.           end
  238.         )
  239.  
  240.       end)
  241.  
  242. -- Get job grade data
  243.       table.insert(tasks2, function(cb2)
  244.  
  245.         MySQL.Async.fetchAll(
  246.           'SELECT * FROM `job_grades` WHERE `job_name` = @job_name AND `grade` = @grade',
  247.           {
  248.             ['@job_name'] = userData.job.name,
  249.             ['@grade']    = userData.job.grade
  250.           },
  251.           function(result)
  252.  
  253.             userData.job['grade_name']   = result[1].name
  254.             userData.job['grade_label']  = result[1].label
  255.             userData.job['grade_salary'] = result[1].salary
  256.  
  257.             userData.job['skin_male']   = {}
  258.             userData.job['skin_female'] = {}
  259.  
  260.             if result[1].skin_male ~= nil then
  261.               userData.job['skin_male'] = json.decode(result[1].skin_male)
  262.             end
  263.  
  264.             if result[1].skin_female ~= nil then
  265.               userData.job['skin_female'] = json.decode(result[1].skin_female)
  266.             end
  267.  
  268.             cb2()
  269.  
  270.           end
  271.         )
  272.  
  273.       end)
  274.      
  275.       table.insert(tasks2, function(cb2)
  276.  
  277.         MySQL.Async.fetchAll(
  278.           'SELECT * FROM `job_grades` WHERE `job_name` = @job_name AND `grade` = @grade',
  279.           {
  280.             ['@job_name'] = userData.job2.name,
  281.             ['@grade']    = userData.job2.grade
  282.           },
  283.           function(result)
  284.  
  285.             userData.job2['grade_name']   = result[1].name
  286.             userData.job2['grade_label']  = result[1].label
  287.             userData.job2['grade_salary'] = result[1].salary
  288.  
  289.             userData.job2['skin_male']   = {}
  290.             userData.job2['skin_female'] = {}
  291.  
  292.             if result[1].skin_male ~= nil then
  293.               userData.job2['skin_male'] = json.decode(result[1].skin_male)
  294.             end
  295.  
  296.             if result[1].skin_female ~= nil then
  297.               userData.job2['skin_female'] = json.decode(result[1].skin_female)
  298.             end
  299.  
  300.             cb2()
  301.  
  302.           end
  303.         )
  304.  
  305.       end)
  306.  
  307.       Async.series(tasks2, cb)
  308.  
  309.     end)
  310.  
  311. AddEventHandler('playerDropped', function(reason)
  312.     local _source = source
  313.     local xPlayer = ESX.GetPlayerFromId(_source)
  314.  
  315.     if xPlayer then
  316.         TriggerEvent('esx:playerDropped', _source, reason)
  317.  
  318.         ESX.SavePlayer(xPlayer, function()
  319.             ESX.Players[_source] = nil
  320.             ESX.LastPlayerData[_source] = nil
  321.         end)
  322.     end
  323. end)
  324.  
  325. RegisterServerEvent('esx:updateLoadout')
  326. AddEventHandler('esx:updateLoadout', function(loadout)
  327.     local xPlayer = ESX.GetPlayerFromId(source)
  328.     xPlayer.loadout = loadout
  329. end)
  330.  
  331. RegisterServerEvent('esx:updateLastPosition')
  332. AddEventHandler('esx:updateLastPosition', function(position)
  333.     local xPlayer = ESX.GetPlayerFromId(source)
  334.     xPlayer.setLastPosition(position)
  335. end)
  336.  
  337. RegisterServerEvent('esx:giveInventoryItem')
  338. AddEventHandler('esx:giveInventoryItem', function(target, type, itemName, itemCount)
  339.     local _source = source
  340.  
  341.     local sourceXPlayer = ESX.GetPlayerFromId(_source)
  342.     local targetXPlayer = ESX.GetPlayerFromId(target)
  343.  
  344.     if type == 'item_standard' then
  345.  
  346.         local sourceItem = sourceXPlayer.getInventoryItem(itemName)
  347.         local targetItem = targetXPlayer.getInventoryItem(itemName)
  348.  
  349.         if itemCount > 0 and sourceItem.count >= itemCount then
  350.  
  351.             if targetItem.limit ~= -1 and (targetItem.count + itemCount) > targetItem.limit then
  352.                 TriggerClientEvent('esx:showNotification', _source, _U('ex_inv_lim', targetXPlayer.name))
  353.             else
  354.                 sourceXPlayer.removeInventoryItem(itemName, itemCount)
  355.                 targetXPlayer.addInventoryItem   (itemName, itemCount)
  356.                
  357.                 TriggerClientEvent('esx:showNotification', _source, _U('gave_item', itemCount, ESX.Items[itemName].label, targetXPlayer.name))
  358.                 TriggerClientEvent('esx:showNotification', target,  _U('received_item', itemCount, ESX.Items[itemName].label, sourceXPlayer.name))
  359.            
  360.                 TriggerEvent("esx:giveitemalert",sourceXPlayer.name,targetXPlayer.name,ESX.Items[itemName].label,itemCount)
  361.             end
  362.  
  363.  
  364.         else
  365.             TriggerClientEvent('esx:showNotification', _source, _U('imp_invalid_quantity'))
  366.         end
  367.  
  368.     elseif type == 'item_money' then
  369.  
  370.         if itemCount > 0 and sourceXPlayer.getMoney() >= itemCount then
  371.             sourceXPlayer.removeMoney(itemCount)
  372.             targetXPlayer.addMoney   (itemCount)
  373.  
  374.             TriggerClientEvent('esx:showNotification', _source, _U('gave_money', ESX.Math.GroupDigits(itemCount), targetXPlayer.name))
  375.             TriggerClientEvent('esx:showNotification', target,  _U('received_money', ESX.Math.GroupDigits(itemCount), sourceXPlayer.name))
  376.            
  377.             TriggerEvent("esx:givemoneyalert",sourceXPlayer.name,targetXPlayer.name,itemCount)
  378.         else
  379.             TriggerClientEvent('esx:showNotification', _source, _U('imp_invalid_amount'))
  380.         end
  381.  
  382.     elseif type == 'item_account' then
  383.  
  384.         if itemCount > 0 and sourceXPlayer.getAccount(itemName).money >= itemCount then
  385.             sourceXPlayer.removeAccountMoney(itemName, itemCount)
  386.             targetXPlayer.addAccountMoney   (itemName, itemCount)
  387.  
  388.             TriggerClientEvent('esx:showNotification', _source, _U('gave_account_money', ESX.Math.GroupDigits(itemCount), Config.AccountLabels[itemName], targetXPlayer.name))
  389.             TriggerClientEvent('esx:showNotification', target,  _U('received_account_money', ESX.Math.GroupDigits(itemCount), Config.AccountLabels[itemName], sourceXPlayer.name))
  390.        
  391.             TriggerEvent("esx:givemoneybankalert",sourceXPlayer.name,targetXPlayer.name,itemCount)
  392.         else
  393.             TriggerClientEvent('esx:showNotification', _source, _U('imp_invalid_amount'))
  394.         end
  395.  
  396.     elseif type == 'item_weapon' then
  397.  
  398.         if not targetXPlayer.hasWeapon(itemName) then
  399.             sourceXPlayer.removeWeapon(itemName)
  400.             targetXPlayer.addWeapon(itemName, itemCount)
  401.  
  402.             local weaponLabel = ESX.GetWeaponLabel(itemName)
  403.  
  404.             if itemCount > 0 then
  405.                 TriggerClientEvent('esx:showNotification', _source, _U('gave_weapon_ammo', weaponLabel, itemCount, targetXPlayer.name))
  406.                 TriggerClientEvent('esx:showNotification', target,  _U('received_weapon_ammo', weaponLabel, itemCount, sourceXPlayer.name))
  407.             else
  408.                 TriggerClientEvent('esx:showNotification', _source, _U('gave_weapon', weaponLabel, targetXPlayer.name))
  409.                 TriggerClientEvent('esx:showNotification', target,  _U('received_weapon', weaponLabel, sourceXPlayer.name))
  410.                
  411.                 TriggerEvent("esx:giveweaponalert",sourceXPlayer.name,targetXPlayer.name,weaponLabel)
  412.             end
  413.         else
  414.             TriggerClientEvent('esx:showNotification', _source, _U('gave_weapon_hasalready', targetXPlayer.name, weaponLabel))
  415.             TriggerClientEvent('esx:showNotification', _source, _U('received_weapon_hasalready', sourceXPlayer.name, weaponLabel))
  416.         end
  417.  
  418.     end
  419. end)
  420.  
  421. RegisterServerEvent('esx:removeInventoryItem')
  422. AddEventHandler('esx:removeInventoryItem', function(type, itemName, itemCount)
  423.     local _source = source
  424.  
  425.     if type == 'item_standard' then
  426.  
  427.         if itemCount == nil or itemCount < 1 then
  428.             TriggerClientEvent('esx:showNotification', _source, _U('imp_invalid_quantity'))
  429.         else
  430.             local xPlayer = ESX.GetPlayerFromId(source)
  431.             local xItem = xPlayer.getInventoryItem(itemName)
  432.  
  433.             if (itemCount > xItem.count or xItem.count < 1) then
  434.                 TriggerClientEvent('esx:showNotification', _source, _U('imp_invalid_quantity'))
  435.             else
  436.                 xPlayer.removeInventoryItem(itemName, itemCount)
  437.  
  438.                 local pickupLabel = ('~y~%s~s~ [~b~%s~s~]'):format(xItem.label, itemCount)
  439.                 ESX.CreatePickup('item_standard', itemName, itemCount, pickupLabel, _source)
  440.                 TriggerClientEvent('esx:showNotification', _source, _U('threw_standard', itemCount, xItem.label))
  441.             end
  442.         end
  443.  
  444.     elseif type == 'item_money' then
  445.  
  446.         if itemCount == nil or itemCount < 1 then
  447.             TriggerClientEvent('esx:showNotification', _source, _U('imp_invalid_amount'))
  448.         else
  449.             local xPlayer = ESX.GetPlayerFromId(source)
  450.             local playerCash = xPlayer.getMoney()
  451.  
  452.             if (itemCount > playerCash or playerCash < 1) then
  453.                 TriggerClientEvent('esx:showNotification', _source, _U('imp_invalid_amount'))
  454.             else
  455.                 xPlayer.removeMoney(itemCount)
  456.  
  457.                 local pickupLabel = ('~y~%s~s~ [~g~%s~s~]'):format(_U('cash'), _U('locale_currency', ESX.Math.GroupDigits(itemCount)))
  458.                 ESX.CreatePickup('item_money', 'money', itemCount, pickupLabel, _source)
  459.                 TriggerClientEvent('esx:showNotification', _source, _U('threw_money', ESX.Math.GroupDigits(itemCount)))
  460.             end
  461.         end
  462.  
  463.     elseif type == 'item_account' then
  464.  
  465.         if itemCount == nil or itemCount < 1 then
  466.             TriggerClientEvent('esx:showNotification', _source, _U('imp_invalid_amount'))
  467.         else
  468.             local xPlayer = ESX.GetPlayerFromId(source)
  469.             local account = xPlayer.getAccount(itemName)
  470.  
  471.             if (itemCount > account.money or account.money < 1) then
  472.                 TriggerClientEvent('esx:showNotification', _source, _U('imp_invalid_amount'))
  473.             else
  474.                 xPlayer.removeAccountMoney(itemName, itemCount)
  475.  
  476.                 local pickupLabel = ('~y~%s~s~ [~g~%s~s~]'):format(account.label, _U('locale_currency', ESX.Math.GroupDigits(itemCount)))
  477.                 ESX.CreatePickup('item_account', itemName, itemCount, pickupLabel, _source)
  478.                 TriggerClientEvent('esx:showNotification', _source, _U('threw_account', ESX.Math.GroupDigits(itemCount), string.lower(account.label)))
  479.             end
  480.         end
  481.  
  482.     elseif type == 'item_weapon' then
  483.  
  484.         local xPlayer = ESX.GetPlayerFromId(source)
  485.         local loadout = xPlayer.getLoadout()
  486.  
  487.         for i=1, #loadout, 1 do
  488.             if loadout[i].name == itemName then
  489.                 itemCount = loadout[i].ammo
  490.                 break
  491.             end
  492.         end
  493.  
  494.         if xPlayer.hasWeapon(itemName) then
  495.             local weaponLabel, weaponPickup = ESX.GetWeaponLabel(itemName), 'PICKUP_' .. string.upper(itemName)
  496.  
  497.             xPlayer.removeWeapon(itemName)
  498.  
  499.             if itemCount > 0 then
  500.                 TriggerClientEvent('esx:pickupWeapon', _source, weaponPickup, itemName, itemCount)
  501.                 TriggerClientEvent('esx:showNotification', _source, _U('threw_weapon_ammo', weaponLabel, itemCount))
  502.             else
  503.                 -- workaround for CreateAmbientPickup() giving 30 rounds of ammo when you drop the weapon with 0 ammo
  504.                 TriggerClientEvent('esx:pickupWeapon', _source, weaponPickup, itemName, 1)
  505.                 TriggerClientEvent('esx:showNotification', _source, _U('threw_weapon', weaponLabel))
  506.             end
  507.         end
  508.  
  509.     end
  510. end)
  511.  
  512. RegisterServerEvent('esx:useItem')
  513. AddEventHandler('esx:useItem', function(itemName)
  514.     local xPlayer = ESX.GetPlayerFromId(source)
  515.     local count   = xPlayer.getInventoryItem(itemName).count
  516.  
  517.     if count > 0 then
  518.         ESX.UseItem(source, itemName)
  519.     else
  520.         TriggerClientEvent('esx:showNotification', xPlayer.source, _U('act_imp'))
  521.     end
  522. end)
  523.  
  524. RegisterServerEvent('esx:onPickup')
  525. AddEventHandler('esx:onPickup', function(id)
  526.     local _source = source
  527.     local pickup  = ESX.Pickups[id]
  528.     local xPlayer = ESX.GetPlayerFromId(_source)
  529.  
  530.     if pickup.type == 'item_standard' then
  531.  
  532.         local item      = xPlayer.getInventoryItem(pickup.name)
  533.         local canTake   = ((item.limit == -1) and (pickup.count)) or ((item.limit - item.count > 0) and (item.limit - item.count)) or 0
  534.         local total     = pickup.count < canTake and pickup.count or canTake
  535.         local remaining = pickup.count - total
  536.  
  537.         TriggerClientEvent('esx:removePickup', -1, id)
  538.  
  539.         if total > 0 then
  540.             xPlayer.addInventoryItem(pickup.name, total)
  541.         end
  542.  
  543.         if remaining > 0 then
  544.             TriggerClientEvent('esx:showNotification', _source, _U('cannot_pickup_room', item.label))
  545.  
  546.             local pickupLabel = ('~y~%s~s~ [~b~%s~s~]'):format(item.label, remaining)
  547.             ESX.CreatePickup('item_standard', pickup.name, remaining, pickupLabel, _source)
  548.         end
  549.  
  550.     elseif pickup.type == 'item_money' then
  551.         TriggerClientEvent('esx:removePickup', -1, id)
  552.         xPlayer.addMoney(pickup.count)
  553.     elseif pickup.type == 'item_account' then
  554.         TriggerClientEvent('esx:removePickup', -1, id)
  555.         xPlayer.addAccountMoney(pickup.name, pickup.count)
  556.     end
  557. end)
  558.  
  559. ESX.RegisterServerCallback('esx:getPlayerData', function(source, cb)
  560.  
  561.   local xPlayer = ESX.GetPlayerFromId(source)
  562.  
  563.   cb({
  564.     identifier   = xPlayer.identifier,
  565.     accounts     = xPlayer.getAccounts(),
  566.     inventory    = xPlayer.getInventory(),
  567.     job          = xPlayer.getJob(),
  568.     job2          =xPlayer.getJob2(),
  569.     loadout      = xPlayer.getLoadout(),
  570.     lastPosition = xPlayer.getLastPosition(),
  571.     money        = xPlayer.get('money')
  572.   })
  573.  
  574. end)
  575.  
  576. ESX.RegisterServerCallback('esx:getOtherPlayerData', function(source, cb, target)
  577.  
  578.   local xPlayer = ESX.GetPlayerFromId(target)
  579.  
  580.   cb({
  581.     identifier   = xPlayer.identifier,
  582.     accounts     = xPlayer.getAccounts(),
  583.     inventory    = xPlayer.getInventory(),
  584.     job          = xPlayer.getJob(),
  585.     job2          = xPlayer.getJob2(),
  586.     loadout      = xPlayer.getLoadout(),
  587.     lastPosition = xPlayer.getLastPosition(),
  588.     money        = xPlayer.get('money')
  589.   })
  590.  
  591. end)
  592.  
  593. TriggerEvent("es:addGroup", "jobmaster", "user", function(group) end)
  594.  
  595. ESX.StartDBSync()
  596. ESX.StartPayCheck()
  597.  
  598. ESX.GetItemLabel = function(name)
  599.     if ESX.Items[name] ~= nil then
  600.       return ESX.Items[name].label
  601.     end
  602. end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement