UnspawnPlayer Server function

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

This function was added in version: 0.0.0

Unspawn player of specific id on the server.

NOTE! Always when player join to the server is unspawned. This means that, is invisible for other players on every virutal world and also other players are invisible for him. After death player status is changed back to unspawned. To make player visible to others, you have to spawn him

Syntax

void unspawnPlayer(int id)

Required Arguments

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

Example

function makePlayerInvisible(id,toggle)
{
	if(toggle) // this condition will check if toggle argument is diffrent than bool value false and null
		unspawnPlayer(pid);
	else
		spawnPlayer(pid);
};

Related functions

Server

Shared