IsPlayerLoggedIn

From GT-MP
Jump to: navigation, search
IsPlayerLoggedIn
Server-Side Function
Utilities-terminal.png Server-Side Csharp.png C#

Returns whether a player is logged in to ACL or not.

Dialog-warning.png Using ACL is currently not recommended because of certain issues.

Syntax

API.isPlayerLoggedIn(Client player);

Required Arguments

  • player: parameter input should be in Client type.

NOTE: This function returns data in bool type.

Usage example(s)

[Command("logout", ACLRequired = true)]
public void LogoutCommand(Client sender)
{
  if (!API.isPlayerLoggedIn(sender)) {
    sender.sendChatMessage("~r~You are not logged in.");
    return;
  }
  API.logoutPlayer(sender);
  sender.sendChatMessage("~g~You have been logged out.");
}


References