From 9b637ffa913c691b665c943038d10efa0977a372 Mon Sep 17 00:00:00 2001 From: Resxt <55228336+Resxt@users.noreply.github.com> Date: Sat, 17 Jun 2023 11:09:38 +0200 Subject: [PATCH] chat_command_permissions 1.0.1 Only enable permissions command if the permission system is enabled Added help message for getpermission Added aliases --- chat_commands/chat_command_permissions.gsc | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/chat_commands/chat_command_permissions.gsc b/chat_commands/chat_command_permissions.gsc index 6a0bdde..0672698 100644 --- a/chat_commands/chat_command_permissions.gsc +++ b/chat_commands/chat_command_permissions.gsc @@ -2,8 +2,11 @@ Init() { - CreateCommand(level.chat_commands["ports"], "getpermission", "function", ::GetPlayerPermissionCommand, 2); - CreateCommand(level.chat_commands["ports"], "setpermission", "function", ::SetPlayerPermissionCommand, 4); + if (PermissionIsEnabled()) + { + CreateCommand(level.chat_commands["ports"], "getpermission", "function", ::GetPlayerPermissionCommand, 2, ["default_help_one_player"], ["gp"]); + CreateCommand(level.chat_commands["ports"], "setpermission", "function", ::SetPlayerPermissionCommand, 4, [], ["sp"]); + } }