ed
This commit is contained in:
parent
f333947ed9
commit
032ec698d8
50 changed files with 27 additions and 5845 deletions
|
@ -1,47 +0,0 @@
|
|||
if GetResourceState('qb-core') ~= 'started' then return end
|
||||
|
||||
QBCore = exports['qb-core']:GetCoreObject()
|
||||
|
||||
function ShowNotification(text)
|
||||
QBCore.Functions.Notify(text)
|
||||
end
|
||||
|
||||
function GetPlayersInArea(coords, radius)
|
||||
local coords = coords or GetEntityCoords(PlayerPedId())
|
||||
local radius = radius or 3.0
|
||||
local list = QBCore.Functions.GetPlayersFromCoords(coords, radius)
|
||||
local players = {}
|
||||
for _, player in pairs(list) do
|
||||
if player ~= PlayerId() then
|
||||
players[#players + 1] = player
|
||||
end
|
||||
end
|
||||
return players
|
||||
end
|
||||
|
||||
RegisterNetEvent(GetCurrentResourceName()..":showNotification", function(text)
|
||||
ShowNotification(text)
|
||||
end)
|
||||
|
||||
RegisterNetEvent('QBCore:Client:OnPlayerLoaded', function()
|
||||
TriggerServerEvent("pickle_consumables:initializePlayer")
|
||||
end)
|
||||
|
||||
-- Inventory Fallback
|
||||
|
||||
CreateThread(function()
|
||||
Wait(100)
|
||||
|
||||
if InitializeInventory then return InitializeInventory() end -- Already loaded through inventory folder.
|
||||
|
||||
Inventory = {}
|
||||
|
||||
Inventory.Items = {}
|
||||
|
||||
Inventory.Ready = false
|
||||
|
||||
RegisterNetEvent("pickle_consumables:setupInventory", function(data)
|
||||
Inventory.Items = data.items
|
||||
Inventory.Ready = true
|
||||
end)
|
||||
end)
|
Loading…
Add table
Add a link
Reference in a new issue