fix unknown command when map starts and show message when player is disconnected (issue #49)

This commit is contained in:
Timo Smit 2016-02-16 12:52:34 +01:00
parent b2e68bd99c
commit 7e9009ab17

View file

@ -211,7 +211,9 @@ function commands.onclientcommand(clientId, cmdText)
else
local recipient = stats.get(clientId, "lastMessageFrom")
if et.gentity_get(recipient, "pers.netname") then
if not (recipient and et.gentity_get(recipient, "pers.netname")) then
et.trap_SendConsoleCommand(et.EXEC_APPEND, "csay "..clientId.." \"player not found\";")
else
local message = {}
for i = 1, et.trap_Argc() - 1 do