{"id":159189,"date":"2024-09-29T15:36:20","date_gmt":"2024-09-29T13:36:20","guid":{"rendered":"https:\/\/hifivem.com\/?p=159189"},"modified":"2025-12-23T16:37:05","modified_gmt":"2025-12-23T15:37:05","slug":"lockdown-script","status":"publish","type":"post","link":"https:\/\/fivemx.com\/nl\/lockdown-script\/","title":{"rendered":"Lockdown Script &#8211; Free FiveM Mods"},"content":{"rendered":"<p>Are you looking to manage server access efficiently during specific time periods? The trt_lockdown script is the perfect solution, allowing you to control who can connect to your server when you want to enforce lockdown periods. Here\u2019s how you can install and configure this resource.<\/p>\n<p><strong>What is trt_lockdown?<\/strong><\/p>\n<p>The trt_lockdown script allows you to set designated lockdown hours for your server. During these hours, only players who are whitelisted can connect. This feature is particularly useful for server administrators who want to maintain oversight over player access during specific times.<\/p>\n<p><strong>Belangrijkste functies<\/strong><\/p>\n<ul>\n<li>Automatically closes the server during defined hours.<\/li>\n<li>Whitelisted players can still connect even during a lockdown.<\/li>\n<\/ul>\n<p><strong>How to Install the trt_lockdown Script<\/strong><\/p>\n<p>Installing the trt_lockdown script is straightforward. Just follow these steps:<\/p>\n<ol>\n<li>\n<p><strong>Download the Script<\/strong>: You can find the trt_lockdown script on GitHub. Make sure to download the latest version.<\/p>\n<p><a href=\"https:\/\/github.com\/t0r3tto\/trt_lockdown\" target=\"_blank\" rel=\"noopener\">Download trt_lockdown from GitHub<\/a><\/p>\n<\/li>\n<li>\n<p><strong>Place It in the Resource Directory<\/strong>: Once downloaded, place the script folder in your server\u2019s resource directory. This is usually located in your server files.<\/p>\n<\/li>\n<li>\n<p><strong>Edit the Server Configuration<\/strong>: Open your <code>server.cfg<\/code> file and add the line: <\/p>\n<pre><code>start trt_lockdown<\/code><\/pre>\n<p>This command ensures that the script starts when your server runs.<\/p>\n<\/li>\n<li><strong>Configure Lockdown Settings<\/strong>: The lockdown settings can be customized in the <code>config\/server<\/code> file within the trt_lockdown script folder. Here, you can specify the lockdown hours, allowed identifiers, and Discord role checks. <\/li>\n<\/ol>\n<p><strong>Configuration Options<\/strong><\/p>\n<p>In the configuration file, you can set the following options:<\/p>\n<ul>\n<li><strong>Lockdown Activation<\/strong>: Enable or disable the lockdown feature.<\/li>\n<li><strong>Kick Players<\/strong>: Choose whether to kick all players or keep whitelisted players connected during lockdown.<\/li>\n<li><strong>Lockdown Hours<\/strong>: Specify the hours when the server should close. Use the 24-hour format.<\/li>\n<li><strong>Whitelisted Identifiers<\/strong>: List the identifiers of players who are allowed to connect during lockdown.<\/li>\n<li><strong>Discord Role Check<\/strong>: If applicable, you can set up a Discord bot token and specify which roles can bypass the lockdown.<\/li>\n<\/ul>\n<p>Here\u2019s an example of how the lockdown settings look in the configuration file:<\/p>\n<pre><code class=\"language-lua\">return {\n    versionCheck = true,\n    lockdown = {\n        enabled = true,\n        kickAllPlayers = true,\n        from = { hour = 3, minute = 15 },\n        to = { hour = 17, minute = 30 },\n    },\n\n    allowedIdentifiers = {\n        -- Add player identifiers here\n    },\n\n    discord = {\n        token = false,\n        guildId = '',\n        allowedRoles = {\n            -- Add allowed role identifiers here\n        }\n    }\n}<\/code><\/pre>\n<p>Additionally, you can set permissions for certain players to bypass the lockdown with the following commands:<\/p>\n<pre><code class=\"language-plaintext\">add_ace identifier.discord:xxx lockdown.bypass allow\nadd_ace group.mod lockdown.bypass allow<\/code><\/pre>\n<p>Simply replace <code>identifier.discord:xxx<\/code> with the correct identifier for the player.<\/p>\n<p><strong>Usage<\/strong><\/p>\n<p>Once set up, the script will automatically manage server access according to the lockdown times you\u2019ve specified. Players trying to connect during a lockdown will receive a rejection message unless they are on the whitelist.<\/p>\n<p>With the trt_lockdown script, you gain full control over when and how players access your server, making it an excellent tool for enhancing your server management. Don&#8217;t forget to check out the <a href=\"https:\/\/github.com\/t0r3tto\/trt_lockdown\" target=\"_blank\" rel=\"noopener\">GitHub-repository<\/a> for any updates or further customization options. Happy gaming!<\/p>","protected":false},"excerpt":{"rendered":"<p>Are you looking to manage server access efficiently during specific time periods? The trt_lockdown script is the perfect solution, allowing you to control who can connect to your server when you want to enforce lockdown periods. Here\u2019s how you can install and configure this resource. What is trt_lockdown? The trt_lockdown script allows you to set [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":159190,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[2297,2298],"tags":[3001,2928,3000],"class_list":["post-159189","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-free","category-scripts","tag-fivem-script","tag-free","tag-free-script"],"blocksy_meta":[],"_links":{"self":[{"href":"https:\/\/fivemx.com\/nl\/wp-json\/wp\/v2\/posts\/159189","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/fivemx.com\/nl\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/fivemx.com\/nl\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/fivemx.com\/nl\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/fivemx.com\/nl\/wp-json\/wp\/v2\/comments?post=159189"}],"version-history":[{"count":0,"href":"https:\/\/fivemx.com\/nl\/wp-json\/wp\/v2\/posts\/159189\/revisions"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/fivemx.com\/nl\/wp-json\/wp\/v2\/media\/159190"}],"wp:attachment":[{"href":"https:\/\/fivemx.com\/nl\/wp-json\/wp\/v2\/media?parent=159189"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/fivemx.com\/nl\/wp-json\/wp\/v2\/categories?post=159189"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/fivemx.com\/nl\/wp-json\/wp\/v2\/tags?post=159189"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}