From RAGE Multiplayer Wiki
|
|
| Line 1: |
Line 1: |
| Checks whether a player has access to the given command based on the ACL.
| |
|
| |
|
| ==Syntax==
| |
| {{#tag:pre|{{Template:CSharp_Serverside_namespace}}ACL.DoesPlayerHaveAccessToCommand(Client player);}}
| |
|
| |
| === Required Arguments ===
| |
| *'''player:''' parameter input should be in '''Client''' type
| |
|
| |
| ==Example==
| |
| {{CSharpContainer|
| |
| {{Parameters}}
| |
| *'''player:''' parameter input should be in '''Client''' type
| |
|
| |
| {{Example}}
| |
| <syntaxhighlight lang="C#">
| |
| [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>
| |
| }}
| |
|
| |
| [[Category:Serverside API]]
| |
Latest revision as of 20:42, 27 November 2019