Can someone help me with this code
So I am working on my next release for you guys but it will take a bit longer b/c of 1.3 coming out in 2weeks.
I am starting chat commands and i got the activators down with this
if(par1Str.equalsIgnoreCase("-Fastbreak"))
{
Variables.Fastbreak =!Variables.Fastbreak;
addChatMessage("\247c[BrightLight]\247fFastbreak Toggled!");
}
When i type it to deactivate it sais it again "Fastbreak Toggled!"
But i want it to say "Fastbreak Deactivated" when i type it again and it turns off
Does anyone know how to get it so it sais that when i retype it to turn it off?
if(Variables.Fastbreak)
addChatMessage("Enabled")
else
addChatMessage("Disabled")
pseudocode.
It's because you never defined what the variable is to deactivate it, and what it will say when it deactivates.