Skip to content
This repository has been archived by the owner on Nov 23, 2024. It is now read-only.

Commit

Permalink
Update v1.1
Browse files Browse the repository at this point in the history
* Fixed that players without permission can ban/unban other players
  • Loading branch information
Musiker15 committed Jun 28, 2023
1 parent 9b020f1 commit 7f5b9e5
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 4 deletions.
2 changes: 1 addition & 1 deletion VERSION
Original file line number Diff line number Diff line change
@@ -1 +1 @@
1.0
1.1
2 changes: 1 addition & 1 deletion fxmanifest.lua
Original file line number Diff line number Diff line change
Expand Up @@ -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'

Expand Down
8 changes: 6 additions & 2 deletions server.lua
Original file line number Diff line number Diff line change
Expand Up @@ -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)

Expand All @@ -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
Expand Down

0 comments on commit 7f5b9e5

Please sign in to comment.