Originally Posted by Fizzlemizz
I'm not sure if that was an actual question but if so, something like:
Lua Code:
local msgList = { { "GUILD", "Message 1" }, { "YELL", "Message 2" }, { "PARTY", "Message 3" }, } local function PrintList() print("Help commands = /ph or /sph\nOption = Send - Message:") for i=1, #msgList do print(i, "=", msgList[i][1], "-", msgList[i][2]) end end SLASH_PHRASE1 = "/ph"; SLASH_PHRASE2 = "/sph"; SlashCmdList["PHRASE"] = function(msg) if msg == "" then PrintList() ---------------------------------------------------------------------------------------------------- else local cmd = tonumber(msg) if msgList[cmd] then SendChatMessage(msgList[cmd][2], msgList[cmd][1]) else print("Not a valid option") end end end ----------------------------------------------------------------------------------------------------
|
Ok now I got it! (the first part)
, thank you
, now i could not understand all the rest of the code (the one between the lines) exactly how it works down there?
,if you are so kind to explain it for a really dummy :P