mirror of
https://github.com/etlegacy/wolfadmin.git
synced 2024-11-22 04:12:19 +00:00
Fixed minor issues on several commands
* gib now by correct attacker (world entity) * listlevels should not read shrubbot in standalone mode
This commit is contained in:
parent
839036eb23
commit
449e6c856f
2 changed files with 36 additions and 30 deletions
|
@ -55,9 +55,9 @@ function commandGib(clientId, cmdArguments)
|
|||
end
|
||||
|
||||
-- GENTITYNUM_BITS 10 10
|
||||
-- MAX_GENTITIES 1 << GENTITYNUM_BITS 20
|
||||
-- MAX_GENTITIES 1 << GENTITYNUM_BITS 1024
|
||||
-- ENTITYNUM_WORLD MAX_GENTITIES - 2 18
|
||||
et.G_Damage(cmdClient, 18, 18, 500, 0, 0) -- MOD_UNKNOWN = 0
|
||||
et.G_Damage(cmdClient, 0, 1024, 500, 0, 0) -- MOD_UNKNOWN = 0
|
||||
|
||||
et.trap_SendConsoleCommand(et.EXEC_APPEND, "cchat -1 \"^dgib: ^7"..players.getName(cmdClient).." ^9was gibbed.\";")
|
||||
|
||||
|
|
|
@ -29,6 +29,11 @@ local util = require (wolfa_getLuaPath()..".util.util")
|
|||
|
||||
function commandListLevels(clientId, cmdArguments)
|
||||
if cmdArguments[1] == nil then
|
||||
if settings.get("g_standalone") ~= 0 then
|
||||
et.trap_SendConsoleCommand(et.EXEC_APPEND, "csay "..clientId.." \"^dlistlevels usage: "..commands.getadmin("listlevels")["syntax"].."\";")
|
||||
|
||||
return true
|
||||
else
|
||||
local fileName = et.trap_Cvar_Get("g_shrubbot")
|
||||
local functionStart = et.trap_Milliseconds()
|
||||
local fileDescriptor, fileLength = et.trap_FS_FOpenFile(fileName, et.FS_READ)
|
||||
|
@ -58,6 +63,7 @@ function commandListLevels(clientId, cmdArguments)
|
|||
et.trap_SendConsoleCommand(et.EXEC_APPEND, "cchat "..clientId.." \"^dlistlevels: ^9"..levelsCount.." available levels (open console for the full list)\";")
|
||||
|
||||
return true
|
||||
end
|
||||
elseif not db.isconnected() then
|
||||
et.trap_SendConsoleCommand(et.EXEC_APPEND, "csay "..clientId.." \"^dlistlevels: ^9level history is disabled.\";")
|
||||
|
||||
|
|
Loading…
Reference in a new issue