Hopefully Fixed Jail Bug

This commit is contained in:
Cooldude2606
2018-11-06 20:54:58 +00:00
parent bc39becfcc
commit bcac04888f
11 changed files with 19 additions and 19 deletions

View File

@@ -22,8 +22,8 @@ local ThisModule = {
}
-- Function Define
AdminGui.add_button('ban','utility/danger_icon',{'ExpGamingAdmin.tooltip-ban'},function(player,byPlayer)
Admin.open(byPlayer,player,'ban')
AdminGui.add_button('Ban','utility/danger_icon',{'ExpGamingAdmin.tooltip-ban'},function(player,byPlayer)
Admin.open(byPlayer,player,'Ban')
end)
function Admin.ban(player,by_player,reason)

View File

@@ -16,10 +16,10 @@ end)
return {
on_init = function(self)
if loaded_modules['ExpGamingAdmin.TempBan'] then verbose('ExpGamingAdmin.TempBan is installed; Loading tempban src') require(module_path..'/src/tempban',{Admin=Admin}) end
if loaded_modules['ExpGamingAdmin.Jail'] then verbose('ExpGamingAdmin.Jail is installed; Loading tempban src') require(module_path..'/src/jail',{Admin=Admin}) end
if loaded_modules['ExpGamingAdmin.Warnings'] then verbose('ExpGamingAdmin.Warnings is installed; Loading tempban src') require(module_path..'/src/warnings',{Admin=Admin}) end
if loaded_modules['ExpGamingAdmin.Reports'] then verbose('ExpGamingAdmin.Reports is installed; Loading tempban src') require(module_path..'/src/reports',{Admin=Admin}) end
if loaded_modules['ExpGamingAdmin.ClearInventory'] then verbose('ExpGamingAdmin.ClearInventory is installed; Loading tempban src') require(module_path..'/src/clear',{Admin=Admin}) end
if loaded_modules['ExpGamingAdmin.TempBan'] then verbose('ExpGamingAdmin.TempBan is installed; Loading tempban src') require(module_path..'/src/tempban',{self=Admin}) end
if loaded_modules['ExpGamingAdmin.Jail'] then verbose('ExpGamingAdmin.Jail is installed; Loading tempban src') require(module_path..'/src/jail',{self=Admin}) end
if loaded_modules['ExpGamingAdmin.Warnings'] then verbose('ExpGamingAdmin.Warnings is installed; Loading tempban src') require(module_path..'/src/warnings',{self=Admin}) end
if loaded_modules['ExpGamingAdmin.Reports'] then verbose('ExpGamingAdmin.Reports is installed; Loading tempban src') require(module_path..'/src/reports',{self=Admin}) end
if loaded_modules['ExpGamingAdmin.ClearInventory'] then verbose('ExpGamingAdmin.ClearInventory is installed; Loading tempban src') require(module_path..'/src/clear',{self=Admin}) end
end
}

View File

@@ -1,4 +1,4 @@
local Admin = Admin
local Admin = self
--- Clears a players inventory and moves it to chests in spawn
-- @command clear-inv

View File

@@ -1,5 +1,5 @@
local Admin = Admin
local Role = require('ExpGamingCore.Role')
local Admin = self
local Role = require('ExpGamingCore.Role@^4.0.0')
--- Used to jail a player which stops them from moving
-- @command jail

View File

@@ -1,4 +1,4 @@
local Admin = Admin
local Admin = self
local Role = require('ExpGamingCore.Role@^4.0.0')
--- Reports a player

View File

@@ -1,4 +1,4 @@
local Admin = Admin
local Admin = self
--- Used to temp ban a player and give a reason
-- @command temp-ban

View File

@@ -1,4 +1,4 @@
local Admin = Admin
local Admin = self
local Role = require('ExpGamingCore.Role@^4.0.0')
--- Gives a warning to a player

View File

@@ -131,7 +131,7 @@ local take_action = Gui.inputs{
local _role = Role.get_highest(_player)
if role.index >= _role.index then dropdowns.warning.caption = {'ExpGamingAdmin.rank-high'} return end
local _reason = dropdowns['reason-input-admin-commands'] and dropdowns['reason-input-admin-commands'].text
if (_action == 'Jail' or _action == 'Kick' or _action == 'Ban' or _action == 'Temp Ban') and (_reason == 'Enter Reason' or string.len(_reason) < 20) then return end
if (_action == 'Jail' or _action == 'Kick' or _action == 'Ban' or _action == 'Temp Ban') and (_reason == 'Enter Reason' or string.len(_reason) < 10) then return end
Admin.take_action(_action,_player,event.player_index,_reason)
Gui.center.clear(event)
end)

View File

@@ -24,7 +24,7 @@ local ThisModule = {
-- Function Define
AdminGui.add_button('jail','utility/clock',{'ExpGamingAdmin.tooltip-jail'},function(player,byPlayer)
Admin.open(byPlayer,player,'jail')
Admin.open(byPlayer,player,'Jail')
end)
function Admin.jail(player,by_player,reason)

View File

@@ -21,8 +21,8 @@ local ThisModule = {
end
}
-- Function Define
AdminGui.add_button('kick','utility/warning_icon',{'ExpGamingAdmin.tooltip-kick'},function(player,byPlayer)
Admin.open(byPlayer,player,'kick')
AdminGui.add_button('Kick','utility/warning_icon',{'ExpGamingAdmin.tooltip-kick'},function(player,byPlayer)
Admin.open(byPlayer,player,'Kick')
end)
function Admin.kick(player,by_player,reason)

View File

@@ -14,10 +14,10 @@ local module_verbose = false
local ThisModule = {}
-- Function Define
AdminGui.add_button('goto','utility/export_slot',{'ExpGamingAdmin.tooltip-go-to'},function(player,byPlayer)
AdminGui.add_button('Go To','utility/export_slot',{'ExpGamingAdmin.tooltip-go-to'},function(player,byPlayer)
Admin.go_to(player,byPlayer)
end)
AdminGui.add_button('bring','utility/import_slot',{'ExpGamingAdmin.tooltip-bring'},function(player,byPlayer)
AdminGui.add_button('Bring','utility/import_slot',{'ExpGamingAdmin.tooltip-bring'},function(player,byPlayer)
Admin.bring(player,byPlayer)
end)