mirror of
https://github.com/PHIDIAS0303/ExpCluster.git
synced 2025-12-29 12:16:37 +09:00
Multiple Bug Fixs
This commit is contained in:
@@ -35,10 +35,6 @@ function Admin.create_reason(reason,name)
|
||||
return reason
|
||||
end
|
||||
|
||||
function Admin.open(player,pre_select_player,pre_select_action)
|
||||
if Admin.center then Gui.center.clear(player) Admin.center.open(player,pre_select_player,pre_select_action) end
|
||||
end
|
||||
|
||||
function Admin.allowed(player)
|
||||
local player = Game.get_player(player)
|
||||
if Role then
|
||||
|
||||
@@ -28,6 +28,11 @@ local AdminGui = {
|
||||
buttons={}
|
||||
}
|
||||
|
||||
function Admin.open(player,pre_select_player,pre_select_action)
|
||||
Gui.center.clear(player)
|
||||
Admin.center.open(player,pre_select_player,pre_select_action)
|
||||
end
|
||||
|
||||
-- Function Define
|
||||
function AdminGui.add_button(name,caption,tooltip,callback)
|
||||
AdminGui.buttons[name] = Gui.inputs.add{
|
||||
@@ -212,5 +217,4 @@ Admin.center = Gui.center{
|
||||
|
||||
-- Module Return
|
||||
-- calling will draw the admin buttons to that frame
|
||||
Admin.button_flow = AdminGui
|
||||
return setmetatable(AdminGui,{__call=function(self,...) self.draw(...) end})
|
||||
@@ -39,7 +39,6 @@ function Admin.jail(player,by_player,reason)
|
||||
['By:']='<<inline>>'..by_player_name,
|
||||
['Reason:']=reason
|
||||
} end
|
||||
if Admin.move_inventory then Admin.move_inventory(player) end
|
||||
Role.meta.last_jail = player.name
|
||||
Server.interface(Role.unassign,true,player,Role.get(player),by_player_name)
|
||||
Server.interface(Role.assign,true,player,'Jail',by_player_name)
|
||||
|
||||
@@ -125,7 +125,7 @@ local confirm_report = Gui.inputs{
|
||||
type='button',
|
||||
name='admin-report-confirm',
|
||||
caption='utility/spawn_flag',
|
||||
tooltip={'ExpGamingAdmin.name'}
|
||||
tooltip={'ExpGamingAdmin.report'}
|
||||
}:on_event('click',function(event)
|
||||
local parent = event.element.parent
|
||||
local player = Game.get_player(parent.player.caption)
|
||||
@@ -138,7 +138,7 @@ Admin.report_btn = Gui.inputs{
|
||||
type='button',
|
||||
name='admin-report',
|
||||
caption='utility/spawn_flag',
|
||||
tooltip={'ExpGamingAdmin.name'}
|
||||
tooltip={'ExpGamingAdmin.report'}
|
||||
}:on_event('click',function(event)
|
||||
local parent = event.element.parent
|
||||
local player = Game.get_player(parent.children[1].name)
|
||||
@@ -150,7 +150,7 @@ Admin.report_btn = Gui.inputs{
|
||||
name='report-gui'
|
||||
}
|
||||
_player.opened=frame
|
||||
frame.caption={'ExpGamingAdmin.name'}
|
||||
frame.caption={'ExpGamingAdmin.report'}
|
||||
frame.add{
|
||||
type='textfield',
|
||||
name='reason'
|
||||
|
||||
Reference in New Issue
Block a user