mirror of
https://github.com/etlegacy/wolfadmin.git
synced 2024-11-22 04:12:19 +00:00
Fixed put spam for bots
* now makes use of forceteam instead of !put on legacymod
This commit is contained in:
parent
144a34b3b9
commit
f3aa6dfad5
1 changed files with 9 additions and 2 deletions
|
@ -26,9 +26,16 @@ local bots = {}
|
|||
function bots.put(team)
|
||||
local team = util.getTeamCode(team)
|
||||
|
||||
local command
|
||||
if settings.get("g_standalone") ~= 0 then
|
||||
command = "forceteam"
|
||||
else
|
||||
command = "!put"
|
||||
end
|
||||
|
||||
for playerId = 0, et.trap_Cvar_Get("sv_maxclients") - 1 do
|
||||
if players.isConnected(playerId) and players.isBot(playerId) then
|
||||
et.trap_SendConsoleCommand(et.EXEC_APPEND, "!put "..playerId.." "..team..";")
|
||||
et.trap_SendConsoleCommand(et.EXEC_APPEND, command.." "..playerId.." "..team..";")
|
||||
end
|
||||
end
|
||||
end
|
||||
|
|
Loading…
Reference in a new issue