From 7f5b9e559dd7ec3ace5dd88ad3a50adad6e68412 Mon Sep 17 00:00:00 2001 From: Musiker15 Date: Wed, 28 Jun 2023 20:44:38 +0200 Subject: [PATCH] Update v1.1 * Fixed that players without permission can ban/unban other players --- VERSION | 2 +- fxmanifest.lua | 2 +- server.lua | 8 ++++++-- 3 files changed, 8 insertions(+), 4 deletions(-) diff --git a/VERSION b/VERSION index 9f8e9b6..b123147 100644 --- a/VERSION +++ b/VERSION @@ -1 +1 @@ -1.0 \ No newline at end of file +1.1 \ No newline at end of file diff --git a/fxmanifest.lua b/fxmanifest.lua index a79e66b..285c71f 100644 --- a/fxmanifest.lua +++ b/fxmanifest.lua @@ -4,7 +4,7 @@ games { 'gta5' } author 'Musiker15 - MSK Scripts' name 'msk_bansystem' description 'Simple Ban System' -version '1.0' +version '1.1' lua54 'yes' diff --git a/server.lua b/server.lua index d74dc7a..4242100 100644 --- a/server.lua +++ b/server.lua @@ -70,8 +70,10 @@ if Config.Commands.enable then if src > 0 and isAllowed(src) then banPlayer(src, playerId, time, reason) - else + elseif src == 0 then banPlayer(nil, playerId, time, reason) + else + Config.Notification(src, 'You don\'t have permission to do that!') end end) @@ -83,8 +85,10 @@ if Config.Commands.enable then if src > 0 and isAllowed(src) then unbanPlayer(src, banId) - else + elseif src == 0 then unbanPlayer(nil, banId) + else + Config.Notification(src, 'You don\'t have permission to do that!') end end) end