mirror of
https://github.com/esx-framework/esx_core.git
synced 2026-08-29 00:01:20 +00:00
Fix onPlayerDropped to pass in cb
When third-party scripts use
```lua
debugPrint('[LOGOUT] Awaiting Player to be unloaded [/]')
TriggerEvent('esx:playerLogout', source, function()
cb()
debugPrint('[LOGOUT] Player unloaded.')
end)
```
the issue of not passing in functions
This commit is contained in:
@@ -391,7 +391,7 @@ AddEventHandler("esx:setJob", function(_, job, lastJob)
|
||||
end)
|
||||
|
||||
AddEventHandler("esx:playerLogout", function(playerId, cb)
|
||||
onPlayerDropped(playerId, "esx_player_logout")
|
||||
onPlayerDropped(playerId, "esx_player_logout", cb)
|
||||
TriggerClientEvent("esx:onPlayerLogout", playerId)
|
||||
end)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user