Skip to content

Commit

Permalink
Added vote for maximum bots
Browse files Browse the repository at this point in the history
  • Loading branch information
Timo Smit committed Feb 9, 2017
1 parent 3954583 commit f02f91d
Showing 1 changed file with 11 additions and 0 deletions.
11 changes: 11 additions & 0 deletions luamods/wolfadmin/game/voting.lua
Expand Up @@ -140,6 +140,17 @@ function voting.onPollFinish(passed, poll)
end

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
Expand Down

0 comments on commit f02f91d

Please sign in to comment.