Full Installation Guide - Livaco/LAS GitHub Wiki
To install the addon, first, download and extract the LAS folder from the .zip to your Garry's Mod addon folder. If you want to use Discord Webhooks, keep a hold of that PHP file also provided.
Next, go into the folder, and goto lua/las/config/config.lua
In there, you can define users that have full access no matter what usergroup. Immune Users have not been added yet, as I need to redo the groups system.
Once external databases are added, you goto lua/las/core/sv_sql.lua
, and follow the TOP of that file to set it up. Don't edit anything bellow the line that says "Don't touch ANY of the rest of this file.", as if you don't know Lua you might break something.
The following paragraph is for Discord Webhooks. If you don't want to use Discord Webhooks, goto the next paragraph.
To setup a Discord Webhook, first, make a webhook in your Discord Server (Goto Server Settings > Webhooks, and in the top right "Create Webhook"). Next, your going to need a webserver. Since discord has blocked Garry's Mod Webhook Pings due to spam, the addon needs to proxy it via the php file provided. If you don't have a webserver, simply use 000webhost's free hosting. Upload that PHP file to your website, and goto the php file on your website (So if your using a 000webhost site, https://www.testwebsite.000webhostapp.com/las_discord_webhook.php
), and copy that line. Go back to your Las folder in the addons folder, and goto lua/las/core/sv_discord.lua
, and open it. Set Las.Discord.Enabled
to true, set Las.Discord.Webhook
to your webhook URL, and finally set Las.Discord.Password
to a secure password. This is to verify it's YOU sending the webhook, and not some randomer. Next, go into the .php file you uploaded and edit the config at the TOP. Make sure that $LASWebHook['password']
is the same as the password you set in sv_discord.lua. Also make sure that $LASWebHook['webhookurl']
is set to your webhook URL discord gives you when you make a webhook. Provided you've done it all correctly, every log LAS makes will now output to discord too.
Now, finally, you can start up your server. Once it's fully started, you will need to set yourself to superadmin. Join the game, and type in the server console: las setgroup <YOUR INGAME NAME> superadmin
. You should see LAS log that you've been set to superadmin. This will allow you to run commands. To set other people to usergroups, use !setgroup or !setaccess.
And that's it. Once i've done the UI, you will be able to add/remove usergroups, ect. Until then, this is it.