forked from Simnation/Main
werfen
This commit is contained in:
parent
453b281a4b
commit
46b895aff2
25 changed files with 716 additions and 0 deletions
|
@ -0,0 +1,32 @@
|
|||
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)
|
Loading…
Add table
Add a link
Reference in a new issue