Skip to content

GetCorpseLocation

The GetCorpseLocation function retrieves the coordinates of the player's corpse in the game world. This function is useful for locating the player's corpse after death, which can be important for navigation and resurrection.

Parameters

This function does not take any parameters.

Returns

  • x: The X coordinate of the player's corpse.
  • y: The Y coordinate of the player's corpse.
  • z: The Z coordinate of the player's corpse.

Example Usage in Lua

Here is an example of how to use the GetCorpseLocation function in Lua:

local api = ...

-- Function to print the location of the player's corpse
function PrintCorpseLocation()
    local x, y, z = api.GetCorpseLocation()
    if x and y and z then
        print("Player's corpse is located at: X=" .. x .. ", Y=" .. y .. ", Z=" .. z)
    else
        print("Player's corpse location is not available.")
    end
end

-- Call the function
PrintCorpseLocation()