IsPlayerSpawned Server 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 spawned and false if he is unspawned.

Syntax

bool isPlayerSpawned(int id)

Required Arguments

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

Returns

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

Example

addEventHandler("onPlayerJoin",function(pid)
{
	if (!isPlayerSpawned(pid)) // checking if player not spawned
	{
		spawnPlayer(pid);
	};
});

Related functions

Server

Shared