diff --git a/luamods/wolfadmin/commands/admin/ban.lua b/luamods/wolfadmin/commands/admin/ban.lua index 3660c00..f2764e1 100644 --- a/luamods/wolfadmin/commands/admin/ban.lua +++ b/luamods/wolfadmin/commands/admin/ban.lua @@ -30,7 +30,7 @@ function commandBan(clientId, cmdArguments) et.trap_SendConsoleCommand(et.EXEC_APPEND, "csay "..clientId.." \"^dban usage: "..commands.getadmin("ban")["syntax"].."\";") return true - elseif tonumber(cmdArguments[1]) == nil then + elseif tonumber(cmdArguments[1]) == nil or tonumber(cmdArguments[1]) > tonumber(et.trap_Cvar_Get("sv_maxclients")) then cmdClient = et.ClientNumberFromString(cmdArguments[1]) else cmdClient = tonumber(cmdArguments[1]) diff --git a/luamods/wolfadmin/commands/admin/finger.lua b/luamods/wolfadmin/commands/admin/finger.lua index 4c6195a..17ecf05 100644 --- a/luamods/wolfadmin/commands/admin/finger.lua +++ b/luamods/wolfadmin/commands/admin/finger.lua @@ -29,7 +29,7 @@ function commandFinger(clientId, cmdArguments) et.trap_SendConsoleCommand(et.EXEC_APPEND, "csay "..clientId.." \"^dfinger usage: "..commands.getadmin("finger")["syntax"].."\";") return true - elseif tonumber(cmdArguments[1]) == nil then + elseif tonumber(cmdArguments[1]) == nil or tonumber(cmdArguments[1]) > tonumber(et.trap_Cvar_Get("sv_maxclients")) then cmdClient = et.ClientNumberFromString(cmdArguments[1]) else cmdClient = tonumber(cmdArguments[1]) diff --git a/luamods/wolfadmin/commands/admin/gib.lua b/luamods/wolfadmin/commands/admin/gib.lua index e54a8cf..351e30c 100644 --- a/luamods/wolfadmin/commands/admin/gib.lua +++ b/luamods/wolfadmin/commands/admin/gib.lua @@ -28,7 +28,7 @@ function commandGib(clientId, cmdArguments) et.trap_SendConsoleCommand(et.EXEC_APPEND, "csay "..clientId.." \"^dgib usage: "..commands.getadmin("gib")["syntax"].."\";") return true - elseif tonumber(cmdArguments[1]) == nil then + elseif tonumber(cmdArguments[1]) == nil or tonumber(cmdArguments[1]) > tonumber(et.trap_Cvar_Get("sv_maxclients")) then cmdClient = et.ClientNumberFromString(cmdArguments[1]) else cmdClient = tonumber(cmdArguments[1]) diff --git a/luamods/wolfadmin/commands/admin/kick.lua b/luamods/wolfadmin/commands/admin/kick.lua index 83e2ac9..27eb142 100644 --- a/luamods/wolfadmin/commands/admin/kick.lua +++ b/luamods/wolfadmin/commands/admin/kick.lua @@ -29,7 +29,7 @@ function commandKick(clientId, cmdArguments) et.trap_SendConsoleCommand(et.EXEC_APPEND, "csay "..clientId.." \"^dkick usage: "..commands.getadmin("kick")["syntax"].."\";") return true - elseif tonumber(cmdArguments[1]) == nil then + elseif tonumber(cmdArguments[1]) == nil or tonumber(cmdArguments[1]) > tonumber(et.trap_Cvar_Get("sv_maxclients")) then cmdClient = et.ClientNumberFromString(cmdArguments[1]) else cmdClient = tonumber(cmdArguments[1]) diff --git a/luamods/wolfadmin/commands/admin/mute.lua b/luamods/wolfadmin/commands/admin/mute.lua index 645f585..9dbd055 100644 --- a/luamods/wolfadmin/commands/admin/mute.lua +++ b/luamods/wolfadmin/commands/admin/mute.lua @@ -33,7 +33,7 @@ function commandMute(clientId, cmdArguments) et.trap_SendConsoleCommand(et.EXEC_APPEND, "csay "..clientId.." \"^dmute usage: "..commands.getadmin("mute")["syntax"].."\";") return true - elseif tonumber(cmdArguments[1]) == nil then + elseif tonumber(cmdArguments[1]) == nil or tonumber(cmdArguments[1]) > tonumber(et.trap_Cvar_Get("sv_maxclients")) then cmdClient = et.ClientNumberFromString(cmdArguments[1]) else cmdClient = tonumber(cmdArguments[1]) diff --git a/luamods/wolfadmin/commands/admin/put.lua b/luamods/wolfadmin/commands/admin/put.lua index 8ac076f..2d9a4e6 100644 --- a/luamods/wolfadmin/commands/admin/put.lua +++ b/luamods/wolfadmin/commands/admin/put.lua @@ -26,7 +26,7 @@ function commandPlayerLock(clientId, cmdArguments) et.trap_SendConsoleCommand(et.EXEC_APPEND, "csay "..clientId.." \"^dput usage: "..commands.getadmin("put")["syntax"].."\";") return true - elseif tonumber(cmdArguments[1]) == nil then + elseif tonumber(cmdArguments[1]) == nil or tonumber(cmdArguments[1]) > tonumber(et.trap_Cvar_Get("sv_maxclients")) then cmdClient = et.ClientNumberFromString(cmdArguments[1]) else cmdClient = tonumber(cmdArguments[1]) diff --git a/luamods/wolfadmin/commands/admin/setlevel.lua b/luamods/wolfadmin/commands/admin/setlevel.lua index 2f1ac44..ff6a336 100644 --- a/luamods/wolfadmin/commands/admin/setlevel.lua +++ b/luamods/wolfadmin/commands/admin/setlevel.lua @@ -49,7 +49,7 @@ function commandSetLevel(clientId, cmdArguments) et.trap_SendConsoleCommand(et.EXEC_APPEND, "csay "..clientId.." \"^dsetlevel usage: "..commands.getadmin("setlevel")["syntax"].."\";") return true - elseif tonumber(cmdArguments[1]) == nil then + elseif tonumber(cmdArguments[1]) == nil or tonumber(cmdArguments[1]) > tonumber(et.trap_Cvar_Get("sv_maxclients")) then cmdClient = et.ClientNumberFromString(cmdArguments[1]) else cmdClient = tonumber(cmdArguments[1]) diff --git a/luamods/wolfadmin/commands/admin/slap.lua b/luamods/wolfadmin/commands/admin/slap.lua index c70880d..abcc493 100644 --- a/luamods/wolfadmin/commands/admin/slap.lua +++ b/luamods/wolfadmin/commands/admin/slap.lua @@ -28,7 +28,7 @@ function commandSlap(clientId, cmdArguments) et.trap_SendConsoleCommand(et.EXEC_APPEND, "csay "..clientId.." \"^dslap usage: "..commands.getadmin("slap")["syntax"].."\";") return true - elseif tonumber(cmdArguments[1]) == nil then + elseif tonumber(cmdArguments[1]) == nil or tonumber(cmdArguments[1]) > tonumber(et.trap_Cvar_Get("sv_maxclients")) then cmdClient = et.ClientNumberFromString(cmdArguments[1]) else cmdClient = tonumber(cmdArguments[1]) diff --git a/luamods/wolfadmin/commands/admin/unmute.lua b/luamods/wolfadmin/commands/admin/unmute.lua index 0fc8feb..fcbb107 100644 --- a/luamods/wolfadmin/commands/admin/unmute.lua +++ b/luamods/wolfadmin/commands/admin/unmute.lua @@ -30,7 +30,7 @@ function commandUnmute(clientId, cmdArguments) et.trap_SendConsoleCommand(et.EXEC_APPEND, "csay "..clientId.." \"^dunmute usage: "..commands.getadmin("unmute")["syntax"].."\";") return true - elseif tonumber(cmdArguments[1]) == nil then + elseif tonumber(cmdArguments[1]) == nil or tonumber(cmdArguments[1]) > tonumber(et.trap_Cvar_Get("sv_maxclients")) then cmdClient = et.ClientNumberFromString(cmdArguments[1]) else cmdClient = tonumber(cmdArguments[1]) diff --git a/luamods/wolfadmin/commands/admin/warn.lua b/luamods/wolfadmin/commands/admin/warn.lua index c174dd3..56ee1ae 100644 --- a/luamods/wolfadmin/commands/admin/warn.lua +++ b/luamods/wolfadmin/commands/admin/warn.lua @@ -56,7 +56,7 @@ function commandWarn(clientId, cmdArguments) et.trap_SendConsoleCommand(et.EXEC_APPEND, "csay "..clientId.." \"^dwarn usage: "..commands.getadmin("warn")["syntax"].."\";") return true - elseif tonumber(cmdArguments[1]) == nil then + elseif tonumber(cmdArguments[1]) == nil or tonumber(cmdArguments[1]) > tonumber(et.trap_Cvar_Get("sv_maxclients")) then cmdClient = et.ClientNumberFromString(cmdArguments[1]) else cmdClient = tonumber(cmdArguments[1])