Links
Comment on page

Configuration

Step 1 - Locating the config.php file
Locate the config.php file inside of File Manager. This will be in public_html or the SubDomain folder. When you have located the config file double click it to open the file and edit it.
Step 2 - Base URL
The base url can be located at the top of the config file
// CAD URL \\
define('BASE_URL', 'https://localhost/hamzcad');
Replace the base url with your link. IMPORTANT: Make sure there is no / at the end of the base url.
Step 3 - SQL DATABASE CONNECTION
// SQL DATABASE CONNECTION \\
define('DB_HOST', 'localhost'); // Keep this unless your db is hosted elsewhere
define('DB_USER', 'root'); // Replace root with DB username
define('DB_PASSWORD', ''); // Add DB Password inside of the ''
define('DB_NAME', 'hamzcad'); // Replace hamzcad with DB name
Step 4 - DISCORD OAUTH2
// DISCORD OAUTH2 \\
define('TOKEN', 'TOKEN-HERE');
define('GUILD_ID', 'GUILD-ID-HERE');
define('OAUTH2_CLIENT_ID', 'CLIENT-ID-HERE');
define('OAUTH2_CLIENT_SECRET', 'CLIENT-SECRET-HERE');
Create a application
First you will get the bot token. Head to the bot navigation on your application and create the bot. When you have created the bot click on the Copy button under the token.
Now that you have that copied replace TOKEN-HERE with the token you have copied.
Guild ID. = Right click on your servers profile image on discord and press COPY ID if this is not a option you will have to enable developer mode in the discord settings.
Now replace GUILD-ID-HERE with the ID you now have copied.
OAUTH2 CLIENT ID. = On the dev portal head to OAuth2 section.
Now head to the client id and press the copy button.
Now replace the OAUTH2_CLIENT_ID with the ID you have copied.
OAUTH2 CLIENT SECRET = On the dev portal OAuth2 section copy the secret key.
Now replace OAUTH2_CLIENT_SECRET with what you have copied.
Make sure that the application is inside your discord server, you can do that via the below link.
Discord - A New Way to Chat with Friends & Communities
Discord
Replace CLIENTIDHERE with the applications client ID.
Finally, Set the OAuth2 Redirect here: (link + /actions/register.php)
Step 5 - DISCORD ADMIN PERMISSIONS
$ADMINROLES = [
"ROLEIDHERE", // Replace with role ID
"ROLEIDHERE", // Replace with role ID
];
Replace ROLEIDHERE with a discord ROLE ID not user ID!
Step 6 - DISCORD LOGS
// DISCORD LOGS \\
define('LOGS_COLOR', '#00B2FF'); // Change color code
define('LOGS_IMAGE', 'direct_image_link'); // Replace with a direct image link
define('MISC_LOGS', 'CHANNELID'); // Replace CHANNELID with a Channel ID
define('CHARACTER_LOGS', 'CHANNELID'); // Replace CHANNELID with a Channel ID
define('LAW_BREAKING_LOGS', 'CHANNELID'); // Replace CHANNELID with a Channel ID
define('DEPARTMENT_LOGS', 'CHANNELID'); // Replace CHANNELID with a Channel ID
define('ADMIN_LOGS', 'CHANNELID'); // Replace CHANNELID with a Channel ID
define('DISPATCH_LOGS', 'CHANNELID'); // Replace CHANNELID with a Channel ID
define('STATUS_LOGS', 'CHANNELID'); // Replace CHANNELID with a Channel ID
Step 7 - GENERAL SETTINGS
// GENERAL SETTINGS \\
define('SERVER_SHORT_NAME', 'HAMZ');
define('SERVER_LOGO', 'https://imgur.com/yaHpliD.png');
define('PENAL_CODE_LINK', 'https://docs.hamz.dev'); // # to Disable
define('LIVEMAP_LINK', 'https://docs.hamz.dev'); // # to Disable
define('MAX_CHARACTERS', '10');
define('ALLOW_DUPLICATE_CHARACTER_NAMES', '1'); // 0 to Disable | 1 to Allow
define('GALLERY', '1'); // 0 to Disable | 1 to Enable
define('PRELOADER', '0'); // 0 to Disable | 1 to Enable
define('CALLPANEL911', '1'); // 0 to Disable | 1 to Enable
define('CIVILIAN_PERM_PUBLIC', '0'); // 0 to Disable | 1 to Enable
define('DMV_SYSTEM', '1'); // 0 to Disable | 1 to Enable
define('DISABLE_CIV_LICENSE_EDIT', '0'); // 0 to Disable | 1 to Enable // Disable if DMV is 0
define('POINTS_FOR_DRIVING_SUSPENSION', '6'); // 0 to Disable | 1 or any other digit to set points
define('UPDATE_IDENTIFIER_ON_LOGIN', false); // Update the Identifier with Discord Nickname, Each time a user logs in.
define('IDENTIFIER_CHECK', true); // Displays pop up asking user to verify if they have the correct identifier & department before allowing to access department dashboard.
define('ALLOW_EMS_MARK_CHARACTER_DEAD', true); // If true, allows ems to mark characters as dead or alive.
Step 8 - 10 CODES
Here you can edit the signal/10 codes to fit your server. MAKE SURE TO KEEP THE FORMAT. "10code | 10CODEEXPLINATION" => "#COLOR",
Step 9 - FIRE & EMS APPARATUS
Make sure to keep the format!!!
$FIREEMS_APPARATUS = [
"Engine",
"Tower",
"Medic",
];
Step 10 - LEO STATUSES
Make sure to keep the format!!!
$LEO_STATUSES = [
"10-6 | Busy" => "10-6",
"10-11 | Traffic Stop" => "10-11",
"10-15 | En-Route to Station" => "10-15",
"10-23 | Arrived on Scene" => "10-23",
"10-97 | In Route" => "10-97",
"10-99 | In Distress" => "10-99",
];
Step 11 - FIRE & EMS STATUSES
Make sure to keep the format!!!
$FIREEMS_STATUSES = [
"Roaming" => "Roaming",
"10-6 | Busy" => "10-6",
"10-15 | En-Route to Station" => "10-15",
"10-23 | Arrived on Scene" => "10-23",
"10-97 | In Route" => "10-97",
"10-99 | In Distress" => "10-99",
];
Step 12 - SERVERS
Configure your servers here.
$SERVERS = array(
[
'server_ip' => '149.202.88.5',
'server_port' => '30120'
],
// [
// 'server_ip' => '127.0.0.1',
// 'server_port' => '30121'
// ]
);
Step 13 - COLORING
define('ACCENT_COLOR', '#00B9FF');
define('BACKGROUND_COLOR', '#000000');
define('CARD_COLOR', '#191c24');
define('TEXT_COLOR', '#ffffff');
define('INPUTBOX_COLOR', '#2A3038');
define('SCROLLBAR_COLOR', '#6c7293');
You can modify the colors here to your liking. KEEP THE FORMAT!!!
Step 14 - API KEY
define('SECRET_KEY', 'apitest123'); // Used in some API's
Change apitest123 to a custom key you wan't. This key will be used for the FiveM resources.
Last modified 1yr ago