mirror of
https://github.com/PHIDIAS0303/ExpCluster.git
synced 2025-12-27 11:35:22 +09:00
Hopefully Fixed Jail Bug
This commit is contained in:
@@ -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)
|
||||
|
||||
@@ -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
|
||||
}
|
||||
@@ -1,4 +1,4 @@
|
||||
local Admin = Admin
|
||||
local Admin = self
|
||||
|
||||
--- Clears a players inventory and moves it to chests in spawn
|
||||
-- @command clear-inv
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
local Admin = Admin
|
||||
local Admin = self
|
||||
local Role = require('ExpGamingCore.Role@^4.0.0')
|
||||
|
||||
--- Reports a player
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
local Admin = Admin
|
||||
local Admin = self
|
||||
|
||||
--- Used to temp ban a player and give a reason
|
||||
-- @command temp-ban
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
local Admin = Admin
|
||||
local Admin = self
|
||||
local Role = require('ExpGamingCore.Role@^4.0.0')
|
||||
|
||||
--- Gives a warning to a player
|
||||
|
||||
@@ -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)
|
||||
|
||||
@@ -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)
|
||||
|
||||
@@ -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)
|
||||
|
||||
@@ -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)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user