1
0
Fork 0
forked from Simnation/Main
Main/resources/[tools]/pickle_throwables-1.0.1/bridge/qb/client.lua

34 lines
959 B
Lua
Raw Normal View History

2025-06-12 03:59:16 +02:00
if GetResourceState('qb-core') ~= 'started' then return end
QBCore = exports['qb-core']:GetCoreObject()
function ServerCallback(name, cb, ...)
QBCore.Functions.TriggerCallback(name, cb, ...)
end
function ShowNotification(text)
QBCore.Functions.Notify(text)
end
function ShowHelpNotification(text)
AddTextEntry('qbHelpNotification', text)
BeginTextCommandDisplayHelp('qbHelpNotification')
EndTextCommandDisplayHelp(0, false, false, -1)
end
function GetPlayersInArea(coords, maxDistance)
return QBCore.Functions.GetPlayersFromCoords(coords, maxDistance)
end
function CanAccessGroup(data)
if not data then return true end
local pdata = QBCore.Functions.GetPlayerData()
for k,v in pairs(data) do
if (pdata.job.name == k and pdata.job.grade.level >= v) then return true end
end
return false
end
RegisterNetEvent(GetCurrentResourceName()..":showNotification", function(text)
ShowNotification(text)
end)