COM_AddCommand("autojump", function (player, active) if active == nil then CONS_Printf(player, "autojump : enables or disables auto-jump") CONS_Printf(player, "Autojump is currently " + (player.no_autojump and "disabled" or "enabled")) return end if tonumber(active) or active:lower() == "on" then player.no_autojump = false elseif tonumber(active) == 0 or active:lower() == "off" then player.no_autojump = true else CONS_Printf(player, "autojump : enables or disables auto-jump") CONS_Printf(player, "Autojump is currently " + (player.no_autojump and "disabled" or "enabled")) return end CONS_Printf(player, "Autojump is " + (player.no_autojump and "disabled" or "enabled")) end) COM_AddCommand("autospin", function (player, active) if active == nil then CONS_Printf(player, "autospin : enables or disables auto-spin") CONS_Printf(player, "Autospin is currently " + (player.no_autospin and "disabled" or "enabled")) return end if tonumber(active) or active:lower() == "on" then player.no_autospin = false elseif tonumber(active) == 0 or active:lower() == "off" then player.no_autospin = true else CONS_Printf(player, "autospin : enables or disables auto-spin") CONS_Printf(player, "Autospin is currently " + (player.no_autospin and "disabled" or "enabled")) return end CONS_Printf(player, "Autospin is " + (player.no_autospin and "disabled" or "enabled")) end) addHook("PreThinkFrame", function () for player in players.iterate do if player.playerstate == PST_LIVE and player.mo and P_IsObjectOnGround(player.mo) and not G_EnoughPlayersFinished() then if not player.no_autojump and player.cmd.buttons & BT_JUMP then player.pflags = player.pflags & ~PF_JUMPDOWN elseif not player.no_autospin and player.cmd.buttons & BT_SPIN then player.pflags = player.pflags & ~PF_SPINDOWN end end end end)