local callbackdebug = true
RegisterCommand('raider', function(source)
if source == 0 then
print('[^2EXM^0] - Callbacks debug ^1'..tostring(not callbackdebug)..'^0')
Citizen.Wait(1000)
callbackdebug = not callbackdebug
end
end)
RegisterServerEvent('esx:triggerServerCallback')
AddEventHandler('esx:triggerServerCallback', function(name, requestId, ...)
local playerId = source
if callbackdebug then
local identifier = GetPlayerIdentifiers(playerId)[1]
print('[^2EXM^0] Callback Log: ^1'..name..'^0 Request ID: ^1'..requestId..'^0 Player ID: ^1'..tonumber(playerId)..'^0 Identifier: ^1'..identifier..'^0')
end
ESX.TriggerServerCallback(name, requestID, playerId, function(...)
TriggerClientEvent('esx:serverCallback', playerId, requestId, ...)
end, ...)
end)