Skip to content

Commit

Permalink
Added Update Blacklist & Close button
Browse files Browse the repository at this point in the history
  • Loading branch information
Blumlaut committed Aug 23, 2017
1 parent 87ba58e commit ea7df4c
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 2 deletions.
13 changes: 13 additions & 0 deletions admin_server.lua
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,19 @@ AddEventHandler('banPlayer', function(playerId)
end)


RegisterServerEvent("updateBanlist")
AddEventHandler('updateBanlist', function(playerId)
local numIds = GetNumPlayerIdentifiers(source)
for i,admin in ipairs(admins) do
for i = 0, numIds-1 do
if admin == GetPlayerIdentifier(source,i) then -- is the player requesting the kick ACTUALLY AN ADMIN?
updateBlacklist()
end
end
end
end)



blacklist = {}

Expand Down
6 changes: 4 additions & 2 deletions gui_c.lua
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,10 @@ Citizen.CreateThread(function()

elseif WarMenu.MenuButton('Spectate Player', 'spectateplayers') then

elseif WarMenu.Button('Refresh Banlist') then
TriggerServerEvent("updateBanlist")
elseif WarMenu.Button('Close') then
WarMenu.CloseMenu()
end
end
WarMenu.Display()
Expand Down Expand Up @@ -68,8 +72,6 @@ Citizen.CreateThread(function()
end
WarMenu.Display()

elseif WarMenu.Button('Close') then
WarMenu.CloseMenu()
elseif IsControlJustReleased(0, 289) and isAdmin then --M by default
WarMenu.OpenMenu('admin')
end
Expand Down

0 comments on commit ea7df4c

Please sign in to comment.