After calling deferrals.done()
in the playerConnecting
event, there is a delay before the playerJoining
event is triggered. During this time, the client downloads required resources. However, if the player cancels the download, there is no way to detect or handle this scenario. This proposal suggests adding a new event, playerCanceledJoining
, which is triggered when a player cancels the download before completing the joining process.
AddEventHandler("playerCanceledJoining", function()
-- ex: Cleanup, logging, or metrics tracking
end)
duplicate of github discussion: Proposal: Add a 'playerCanceledJoining' Event · citizenfx/fivem · Discussion #3216 · GitHub