Skip to content

Commit b4e66a5

Browse files
authored
Update playerlist.lua
1 parent 4817425 commit b4e66a5

File tree

1 file changed

+12
-4
lines changed

1 file changed

+12
-4
lines changed

client/playerlist.lua

Lines changed: 12 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
1-
-- Define a variable to hold the selected player's server ID
21
local selectedPlayerServerId = nil
32

43
local players = {}
@@ -48,9 +47,18 @@ local kickReason = input[1]
4847
if kickReason == '' then
4948
kickReason = 'No Kick Reason.'
5049
end
51-
TriggerServerEvent('zaps:kick', selectedPlayerServerId, kickReason)
52-
else
53-
50+
TriggerServerEvent('zaps:kick', selectedPlayerServerId, kickReason)
51+
elseif args.action == 'ban' then
52+
if selectedPlayerServerId then
53+
local input = lib.inputDialog('Ban Panel', {'Reason for ban.', 'Expiry time (optional)'})
54+
if not input then return end
55+
local banReason = input[1]
56+
local banExpiry = input[2] or 'Never'
57+
if banReason == '' then
58+
banReason = 'No Ban Reason.'
59+
end
60+
TriggerServerEvent('zaps:ban', selectedPlayerServerId, banReason, banExpiry)
61+
end
5462
end
5563
end
5664
end)

0 commit comments

Comments
 (0)