// This is has "player.hyper.capable" added to this, \\ ----------------------------- // Have fun anyway, It's also reusable too. :) \\ -------------------------------------------------------------------------- COM_AddCommand("cancelbutton", function(p, arg) if arg == "custom1" or arg == "c1" then p.custom1 = 1 p.custom2 = 0 p.custom3 = 0 p.tossflag = 0 p.firenormal = 0 CONS_Printf(p, "Custom 1 is your cancel button!") elseif arg == "custom2" or arg == "c2" then p.custom2 = 1 p.custom1 = 0 p.custom3 = 0 p.tossflag = 0 p.firenormal = 0 CONS_Printf(p, "Custom 2 is your cancel button!") elseif arg == "custom3" or arg == "c3" then p.custom3 = 1 p.custom1 = 0 p.custom2 = 0 p.tossflag = 0 p.firenormal = 0 CONS_Printf(p, "Custom 3 is your cancel button!") elseif arg == "tossflag" then p.tossflag = 1 p.custom1 = 0 p.custom2 = 0 p.custom3 = 0 p.firenormal = 0 CONS_Printf(p, "Tossflag is your cancel button!") elseif arg == "firenormal" then p.firenormal = 1 p.custom1 = 0 p.custom2 = 0 p.custom3 = 0 p.tossflag = 0 CONS_Printf(p, "FireNormal is your cancel button!") elseif arg == "off" then p.custom1 = 0 p.custom2 = 0 p.custom3 = 0 p.tossflag = 0 p.firenormal = 0 CONS_Printf(p, "There is no cancel button added") end end, COM_ADMIN) addHook("PlayerThink", do for player in players.iterate if (player.cmd.buttons & BT_CUSTOM1) and player.custom1 == 1 and (player.pflags & PF_JUMPED) and not (player.powers[pw_carry]) and (player.hyper.capable) player.hyper.capable = 0 P_RestoreMusic(player) P_SpawnShieldOrb(player) P_SpawnGhostMobj(player.mo) player.mo.color = player.skincolor end end end) addHook("PlayerThink", do for player in players.iterate if (player.cmd.buttons & BT_CUSTOM2) and player.custom2 == 1 and (player.pflags & PF_JUMPED) and not (player.powers[pw_carry]) and (player.hyper.capable) player.hyper.capable = 0 P_RestoreMusic(player) P_SpawnShieldOrb(player) P_SpawnGhostMobj(player.mo) player.mo.color = player.skincolor end end end) addHook("PlayerThink", do for player in players.iterate if (player.cmd.buttons & BT_CUSTOM3) and player.custom3 == 1 and (player.pflags & PF_JUMPED) and not (player.powers[pw_carry]) and (player.hyper.capable) player.hyper.capable = 0 P_RestoreMusic(player) P_SpawnShieldOrb(player) P_SpawnGhostMobj(player.mo) player.mo.color = player.skincolor end end end) addHook("PlayerThink", do for player in players.iterate if (player.cmd.buttons & BT_TOSSFLAG) and player.tossflag == 1 and (player.pflags & PF_JUMPED) and not (player.powers[pw_carry]) and (player.hyper.capable) player.hyper.capable = 0 P_RestoreMusic(player) P_SpawnShieldOrb(player) P_SpawnGhostMobj(player.mo) player.mo.color = player.skincolor end end end) addHook("PlayerThink", do for player in players.iterate if (player.cmd.buttons & BT_FIRENORMAL) and player.firenormal == 1 and (player.pflags & PF_JUMPED) and not (player.powers[pw_carry]) and (player.hyper.capable) player.hyper.capable = 0 P_RestoreMusic(player) P_SpawnShieldOrb(player) P_SpawnGhostMobj(player.mo) player.mo.color = player.skincolor end end end)