• Web Commands - Open web pages with simples chat commands!
    7 replies, posted
[B]What is it?[/B] Web Commands is an addon that let you configure a list of commands that will open web pages easily. [B]How do I add my own commands?[/B] Well here is the configuration file, if you aren't smart enough to figure it out by yourself then... Just give up ;) [CODE] -- Do not put "/" or "!" in the command, it's detected automatically! -- Syntax: -- {"Command", "Description", "URL"}, web_commands_config = { {"forums", "Facepunch Forums!", "http://facepunch.com/"}, {"wiki", "Garry's Mod Wiki", "http://wiki.garrysmod.com/page/Main_Page"} -- Make sure that the last line does not have a "," } [/CODE] [B]How do I download it?[/B] You click [URL="https://mega.co.nz/#!skZk3CjC!NIjiP3IA1mxScrxs236Fq1U_6odK1whbak8u9_PEE5g"]here[/URL]. (MEGA.co) [B]Changelog:[/B] - 1.0 * Initial release.
Looks nice! Thanks :)
The last line can have a "," in lua tables. It doesn't matter if it's here or not.
[QUOTE=Tenrys;43213154]The last line can have a "," in lua tables. It doesn't matter if it's here or not.[/QUOTE] you sure? i know for a fact i've had to add them there before. i get a syntax error if i don't. unless it was something recently added or something because i haven't made the mistake of forgetting one for probably a year or more
[lua]local t1 = { 1, 2, 3, 4 } local t2 = { "1", "2", "3", }[/lua] Lua allows a trailing comma in table constructors. It's optional.
Well, better safe than sorry.
Nice little module you got here. Good job :)
for some reason installing this disabled my pointshop..
Sorry, you need to Log In to post a reply to this thread.