IsPlayerDead Shared function

From Gothic 2 Online: Wiki
Jump to navigation Jump to search

This function was added in version: 0.0.0

Returns true if the player is dead and false if he is alive.

Syntax

bool isPlayerDead(int id)

Required Arguments

  • id: id of the player who you want to check.

Returns

  • true if the player is dead, or false if not.

Example

function teleport(id, x, y, z)
{
    if(!isPlayerDead(id))
        setPlayerPosition(id, x, y, z);
    else
        print("Wait for respawn");
}

Related functions

Server

Shared