respawnPlayerPedEvent
This native is a server side native which requires OneSync enabled to run it. It gets triggered when a player respawns.
Parameters
string player, table content
- player: The player that has respawned.
- table: A table which contains information regarding the player’s respawn.
Examples
This example prints the name of the player and his coordinates on respawn.
Lua Example:
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)