mirror of
https://github.com/esx-framework/esx_core.git
synced 2026-08-31 10:18:54 +00:00
Implemented esx_service:notifyAllInService and esx_service:getInServiceList
This commit is contained in:
@@ -0,0 +1,20 @@
|
||||
ESX = nil
|
||||
|
||||
Citizen.CreateThread(function()
|
||||
while ESX == nil do
|
||||
TriggerEvent('esx:getSharedObject', function(obj) ESX = obj end)
|
||||
Citizen.Wait(0)
|
||||
end
|
||||
end)
|
||||
|
||||
RegisterNetEvent('esx_service:notifyAllInService')
|
||||
AddEventHandler('esx_service:notifyAllInService', function(notification, target)
|
||||
target = GetPlayerFromServerId(target)
|
||||
if target == PlayerId() then return end
|
||||
|
||||
local targetPed = GetPlayerPed(target)
|
||||
local mugshot, mugshotStr = ESX.Game.GetPedMugshot(targetPed)
|
||||
|
||||
ESX.ShowAdvancedNotification(notification.title, notification.subject, notification.msg, mugshotStr, notification.iconType)
|
||||
UnregisterPedheadshot(mugshot)
|
||||
end)
|
||||
Reference in New Issue
Block a user