Added vote for maximum bots

This commit is contained in:
Timo Smit 2017-02-09 10:31:27 +01:00
parent 3954583bc5
commit f02f91dc34
1 changed files with 11 additions and 0 deletions

View File

@ -140,6 +140,17 @@ function voting.onPollFinish(passed, poll)
end end
et.trap_SendConsoleCommand(et.EXEC_APPEND, "bot difficulty "..difficulty) et.trap_SendConsoleCommand(et.EXEC_APPEND, "bot difficulty "..difficulty)
elseif string.find(poll, "set bot max") == 1 then
local amount = string.sub(poll, 13)
if tonumber(amount) then
amount = tonumber(amount)
else
return
end
et.trap_SendConsoleCommand(et.EXEC_APPEND, "bot maxbots "..amount)
et.trap_SendConsoleCommand(et.EXEC_APPEND, "cchat -1 \"^dmaxbots: ^9maximum set to ^7"..amount.." ^9bots.\";")
end end
end end
end end