local playerPed = PlayerPedId()
-- fade out the player while flashing them
NetworkFadeOutEntity(playerPed, true, false)
while NetworkIsEntityFading(playerPed) do
Wait(0)
end
--- Do something like a teleport, or warp into a vehicle
-- while generally frowned upon when you can use natives, this declaration has
-- a missing parameter, which doesn't work without manually invoking.
Citizen.InvokeNative(0x1F4ED342ACEFE62D, playerPed, false, true)
while NetworkIsEntityFading(playerPed) do
Wait(0)
end