Перейти к содержанию

IsPlayerLoggedIn

Материал из RAGE MP Wiki Archive

Checks whether a player is logged in the ACL.


<syntaxhighlight lang="csharp">bool NAPI.ACL.IsPlayerLoggedIn(Client player);</syntaxhighlight>

Parameters

  • player: parameter input should be in Client type


Example

<syntaxhighlight lang="csharp"> [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.");

} </syntaxhighlight>