Adding the player list

This commit is contained in:
Cooldude2606
2017-12-28 13:26:43 +00:00
parent bbf7d7753e
commit cef921e7ed
2 changed files with 51 additions and 1 deletions

View File

@@ -0,0 +1,41 @@
--[[
Explosive Gaming
This file can be used with permission but this and the credit below must remain in the file.
Contact a member of management on our discord to seek permission to use our code.
Any changes that you may make to the code are yours but that does not make the script yours.
Discord: https://discord.gg/r6dC2uK
]]
--Please Only Edit Below This Line-----------------------------------------------------------
local function _global(reset)
global.addons = not reset and global.addons or {}
global.addons.player_list = not reset and global.addons.player_list or {update=0,delay=10}
return global.addons.player_list
end
local function queue_update(tick)
local data = _global()
local tick = tick or game.tick
if tick + data.delay > data.update then
data.update = tick + data.delay
end
end
Gui.left.add{
name='player-list',
caption='entity/player',
tooltip='Toggles the player list',
draw=function(frame)
frame.caption = ''
local player_list = frame.add{
name="scroll",
type = "scroll-pane",
direction = "vertical",
vertical_scroll_policy="always",
horizontal_scroll_policy="never"
}
end,
open_on_join=true
}

View File

@@ -8,4 +8,13 @@ Discord: https://discord.gg/r6dC2uK
]]
--Please Only Edit Below This Line-----------------------------------------------------------
-- this file will just contain all the diffrent requires
-- this file will just contain all the diffrent requires
-- admin dir
-- commands dir
-- guis dir
require('Guis/player-list')
-- other