|
| 01 Jan 2016 10:50 AM |
local cmds = { ["ban"] = true; ["kick"] = true; ["admin"] = true; ["unadmin"] = true; ["unban"] = true; ["punish"] = true; ["cmds"] = true; ["unpunish"] = true; ["cmdbar"] = true; }
How would I add a description for each of these?
say if I wanted to print what "ban" does
it would print
"Kicks a player from game and doesn't allow them to rejoin"
How would I add that into the table? |
|
|
| Report Abuse |
|
|
| |
|
OzzyFin
|
  |
| Joined: 07 Jun 2011 |
| Total Posts: 3600 |
|
|
| 01 Jan 2016 11:13 AM |
local cmds = { ban = { desc = "Bans the player defined", func = function() --ban player end, -- mayb more stuff } }
this is how I'd do it
and after someone chats a command it would fire the function cmds[command].func() |
|
|
| Report Abuse |
|
|
| |
|