View Single Post
05-25-21, 11:31 AM   #4
Fizzlemizz
I did that?
 
Fizzlemizz's Avatar
Premium Member
AddOn Author - Click to view addons
Join Date: Dec 2011
Posts: 1,877
Use a toggle depending on what you want to toggle.

Lua Code:
  1. local SomeBooleanVariable -- could be a SavedVaraible to save between sessions.
  2. SlashCmdList.MYSLASHFUNCTION = function(msg)
  3.     SomeFrame:SetShown(not SomeFrame:IsShown()) -- show/hide a frame
  4.  
  5.     SomeBooleanVariable = not SomeBooleanVariable -- toggle boolean variable
  6.     if SomeBooleanVariable then -- and action it
  7.         -- do thing if true
  8.     else
  9.         -- do thing if false
  10.     end
  11. end
__________________
Fizzlemizz
Maintainer of Discord Unit Frames and Discord Art.
Author of FauxMazzle, FauxMazzleHUD and Move Pad Plus.

Last edited by Fizzlemizz : 05-25-21 at 11:33 AM.
  Reply With Quote