Installation
Step 1 - Execute SQL
Included with the package you downloaded, you'll find a database.sql
file
database.sql
Use your prefered SQL client (HeidiSQL/phpmyadmin/...) to execute the SQL onto your database.
CREATE TABLE IF NOT EXISTS `hg_login` (
`id` int(11) NOT NULL AUTO_INCREMENT,
`email` varchar(30) CHARACTER SET utf8mb4 NOT NULL,
`username` varchar(20) CHARACTER SET utf8mb4 NOT NULL,
`password` text CHARACTER SET utf8mb4 NOT NULL,
`identifier` text CHARACTER SET utf8mb4 NOT NULL,
`discord` varchar(20) CHARACTER SET utf8mb4 NOT NULL,
`pin` int(11) DEFAULT NULL,
`verified` int(1) unsigned zerofill DEFAULT 0 NOT NULL, -- Default to 0
`temppass` text CHARACTER SET utf8mb4 DEFAULT NULL,
`whitelisted` int(1) unsigned zerofill DEFAULT 0 NOT NULL, -- Default to 0
KEY `uid` (`id`) USING BTREE
) ENGINE=InnoDB AUTO_INCREMENT=42 DEFAULT CHARSET=latin1;
Step 2 - Add script to resouces folder
Add the script to the FiveM resources folder
Warning
Don't change the resource's name as it may cause some problems.
Step 3 - Start the resouce
Add the resource to your server.cfg
(first script)
Warning
Ensure that 'hg-login' is the first resource listed in your server.cfg file.
Step 4 (Optional) - Change configuration
Configure the script to your liking. Open config.lua
in your prefered text editor and change the default values.
You can find a detailed explanation of the available options in the Configuration
-
Configuration
Detailed documentation for available configuration options
Step 5 (Required if you set whitelist to true) - Discord Integration
To enable Discord integration and set up your whitelist manager, follow these steps:
- Create a text channel in your Discord server.
- Make a webhook for the text channel and paste it into the
Config.WebHook
field. - Copy the text channel ID and paste it into the
Config.ChannelID
field. - Create a Discord bot and invite it to your server. Ensure the bot has read permissions for the created text channel.
- Paste your Discord bot token into the
Config.BotToken
field. - Make sure to check the "MESSAGE CONTENT INTENT" inside your Discord bot application here.
Here is an example configuration in your hg-login/config.lua
: