IsPlayerLoggedIn

From GTA Network Wiki
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.

Syntax

bool NAPI.ACL.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 (!NAPI.ACL.IsPlayerLoggedIn(sender)) {
    sender.sendChatMessage("~r~You are not logged in.");
    return;
  }
  NAPI.ACL.LogoutPlayer(sender);
  sender.sendChatMessage("~g~You have been logged out.");
}

Changelog

Version Description
1.0 Release.

References