Hi i just got some error like this
idk why just only me get this error at my server
Can you show your code at that line? 595 of server main.lua?
no source as first arg in trigger client eent
sure here where go
client.lua
local target, distance = ESX.Game.GetClosestPlayer()
playerheading = GetEntityHeading(GetPlayerPed(-1))
playerlocation = GetEntityForwardVector(PlayerPedId())
playerCoords = GetEntityCoords(GetPlayerPed(-1))
local target_id = GetPlayerServerId(target)
if distance <= 2.0 then
TriggerServerEvent('esx_policejob:requestarrest', target_id, playerheading, playerCoords, playerlocation)
TriggerServerEvent('InteractSound_SV:PlayWithinDistance', 5.0, 'handcuff', 0.8)
else
exports['mythic_notify']:SendAlert('inform', 'terlalu jauh untuk memborgol')
server.lua
RegisterServerEvent('esx_policejob:requestarrest')
AddEventHandler('esx_policejob:requestarrest', function(targetid, playerheading, playerCoords, playerlocation)
_source = source
TriggerClientEvent('esx_policejob:getarrested', targetid, playerheading, playerCoords, playerlocation)
TriggerClientEvent('esx_policejob:doarrested', _source)
end)
but just only me, everybody in server didnt have this problem