Originally Posted by Fizzlemizz
The function for a slash commands has a single string parameter you can use for different actions:
Lua Code:
SLASH_MYSLASHFUNCTION1 = "/ms" SlashCmdList.MYSLASHFUNCTION = function(msg) local name = UnitName("player") if msg:upper() == "HI" then print("Nice day to you " .. name) elseif msg:upper() == "BYE" then print("Time to go " .. name) end end
|
what if i wanna use just /ms to turn something one and /ms to turn off? without adding worlds like /ms on or /ms off ?