wrenchInstallation

📁 1. Download and Extract

  • Download the lone_leaderboard.zip from your keymaster.

  • Extract the lone_leaderboard.zip

  • Place it inside your resources folder (e.g. resources/[your_category]/lone_leaderboard).


🧠 2. Database Setup

  • The script automatically creates the required table (lone_leaderboard) when first started.

  • ✅ No need to manually import SQL.

  • If you prefer to do it manually, here’s the SQL:

/* SQL script to create the `lone_leaderboard` table
 * This table is designed to store player statistics for a leaderboard system.
 * don't install manually, script will do it automatically, this is just for reference
 */

CREATE TABLE IF NOT EXISTS `lone_leaderboard` (
`identifier` varchar(50) NOT NULL,
`discord_id` varchar(300) DEFAULT NULL,
`name` varchar(100) NOT NULL,
`avatar_url` longtext DEFAULT NULL,
`playtime_total` int(11) DEFAULT 0,
`playtime_longest` int(11) DEFAULT 0,
`kills` int(11) DEFAULT 0,
`deaths` int(11) DEFAULT 0,
`kd_ratio` float DEFAULT 0,
`kms_walked` float DEFAULT 0,
`kms_car` float DEFAULT 0,
`kms_bike` float DEFAULT 0,
`kms_bicycle` float DEFAULT 0,
`kms_truck` float DEFAULT 0,
`kms_boat` float DEFAULT 0,
`kms_heli` float DEFAULT 0,
`kms_plane` float DEFAULT 0,
`bank_money` bigint(20) unsigned DEFAULT 0,
`times_arrested` int(11) DEFAULT 0,
`jail_time` int(11) DEFAULT 0,
`job_stats` longtext CHARACTER SET utf8mb4 COLLATE utf8mb4_bin DEFAULT '{}' CHECK (json_valid(`job_stats`)),
`custom_stats` longtext CHARACTER SET utf8mb4 COLLATE utf8mb4_bin DEFAULT '{}' CHECK (json_valid(`custom_stats`)),
`player_settings` longtext CHARACTER SET utf8mb4 COLLATE utf8mb4_bin DEFAULT '{}' CHECK (json_valid(`player_settings`)),
`created_at` timestamp NOT NULL DEFAULT current_timestamp(),
`updated_at` timestamp NOT NULL DEFAULT current_timestamp() ON UPDATE current_timestamp(),
PRIMARY KEY (`identifier`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_general_ci;

Last updated