Ban Server function

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

This function was added in version: 0.0.0

Ban player of specific id on the server.

Syntax

void ban(int id, int minutes, string reason)

Required Arguments

  • id: id of the player who you want to ban.
  • minutes: minutes of ban. If minutes are negative number, then ban is permanent.
  • reason: reason of the ban.

Example

addEventHandler("onPlayerJoin",function(pid)
{
	if(getPlayerName(pid) == "Jesus")
	{
		ban(pid,5,"Jesus died 20 centuries ago, so you can't be him! Think about that for five minutes.");
	}
});

Related functions

Server

Shared