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

32 lines
804 B
Lua
Raw Normal View History

2025-06-12 03:59:16 +02:00
if GetResourceState('es_extended') ~= 'started' then return end
ESX = exports.es_extended:getSharedObject()
function ShowNotification(text)
ESX.ShowNotification(text)
end
function ShowHelpNotification(text)
ESX.ShowHelpNotification(text)
end
function ServerCallback(name, cb, ...)
ESX.TriggerServerCallback(name, cb, ...)
end
function GetPlayersInArea(coords, maxDistance)
return ESX.Game.GetPlayersInArea(coords, maxDistance)
end
function CanAccessGroup(data)
if not data then return true end
local pdata = ESX.GetPlayerData()
for k,v in pairs(data) do
if (pdata.job.name == k and pdata.job.grade >= v) then return true end
end
return false
end
RegisterNetEvent(GetCurrentResourceName()..":showNotification", function(text)
ShowNotification(text)
end)