This native is a server side native which requires OneSync enabled to run it. It gets triggered when a player respawns.
string player, table content
- player: The player that has respawned.
- table: A table which contains information regarding the player’s respawn.
This example prints the name of the player and his coordinates on respawn.
AddEventHandler("respawnPlayerPedEvent", function(player, content) print(GetPlayerName(player).." has spawned at "..tostring(content.posX)..", "..tostring(content.posY)..", "..tostring(content.posZ)) end)
Last modified May 23, 2020: Update respawnPlayerPedEvent.md (623f67b)