{"id":59371,"date":"2024-02-05T09:20:48","date_gmt":"2024-02-05T08:20:48","guid":{"rendered":"https:\/\/fivem-mods.net\/?p=59371"},"modified":"2025-08-27T10:06:42","modified_gmt":"2025-08-27T08:06:42","slug":"como-se-tornar-um-administrador-em-servidores-fivem","status":"publish","type":"post","link":"https:\/\/fivemx.com\/pt\/how-to-become-an-admin-on-fivem-servers\/","title":{"rendered":"Guia de administra\u00e7\u00e3o do FiveM (2025): configura\u00e7\u00e3o segura, correta e r\u00e1pida"},"content":{"rendered":"\n<h2 class=\"wp-block-heading\">TL;DR (Quick Start)<\/h2>\n\n\n\n<ul class=\"wp-block-list\">\n<li><strong>Get permission first.<\/strong> Only the server owner may grant admin.<\/li>\n\n\n\n<li><strong>Use correct identifiers.<\/strong> Prefer <strong>Rockstar license<\/strong> (<code>identifier.license:...<\/code>). SteamID64 is legacy.<\/li>\n\n\n\n<li><strong>Bootstrap via ACE<\/strong> (server.cfg) or framework tools, then refine in\u2011game.<\/li>\n\n\n\n<li><strong>QBCore:<\/strong> Add <code>qbcore.god<\/code>\/<code>qbcore.admin<\/code> via <code>server.cfg<\/code> (ACE).<\/li>\n\n\n\n<li><strong>ESX:<\/strong> Use <code>\/setgroup [id] admin<\/code> (highest by default) or set <code>users.group = 'admin'<\/code> in DB.<\/li>\n\n\n\n<li><strong>vRP:<\/strong> Give yourself the <code>admin<\/code>\/<code>superadmin<\/code> group via in\u2011game admin menu or the <code>vrp_user_groups<\/code> table (vRP 1.x).<\/li>\n\n\n\n<li><strong>Restart and verify.<\/strong> Test an admin\u2011only command, check logs.<\/li>\n<\/ul>\n\n\n\n<blockquote class=\"wp-block-quote is-layout-flow wp-block-quote-is-layout-flow\">\n<p class=\"wp-block-paragraph\">Need tools? See <strong><a href=\"https:\/\/fivemx.com\/admin-tools\/\">Admin Tools &amp; More<\/a><\/strong> for recommended admin menus and utilities (e.g., vMenu, logging, moderation helpers).<\/p>\n<\/blockquote>\n\n\n\n<hr class=\"wp-block-separator has-alpha-channel-opacity\"\/>\n\n\n\n<h2 class=\"wp-block-heading\">Prerequisites<\/h2>\n\n\n\n<ul class=\"wp-block-list\">\n<li><strong>Owner approval<\/strong> (non\u2011negotiable). Unauthorized elevation \u2192 ban\/remove.<\/li>\n\n\n\n<li><strong>Access<\/strong> to <code>server.cfg<\/code> (or txAdmin CFG editor) and the database.<\/li>\n\n\n\n<li><strong>Your identifiers:<\/strong> ideally the <strong>Rockstar license<\/strong>; optionally <code>fivem<\/code>, <code>discord<\/code>, or <code>steam<\/code>. Easiest: txAdmin \u2192 <em>Players<\/em> \u2192 select yourself \u2192 copy identifiers.<\/li>\n\n\n\n<li><strong>Tools:<\/strong> a plain\u2011text editor (VS Code\/Notepad++) and DB client (phpMyAdmin\/MySQL Workbench).<\/li>\n<\/ul>\n\n\n\n<hr class=\"wp-block-separator has-alpha-channel-opacity\"\/>\n\n\n\n<h2 class=\"wp-block-heading\">Understanding ACE &amp; Identifiers (Works with Any Framework)<\/h2>\n\n\n\n<p class=\"wp-block-paragraph\"><strong>ACE (Access Control Entries)<\/strong> is FiveM\u2019s built\u2011in permission system. You grant permissions to <strong>principals<\/strong> (players or groups). Typical identifiers:<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li><code>identifier.license:xxxxxxxx<\/code> (Rockstar license) \u2190 <strong>recommended<\/strong><\/li>\n\n\n\n<li><code>identifier.fivem:xxxxx<\/code> (FiveM)<\/li>\n\n\n\n<li><code>identifier.discord:xxxxxxxxxxxxxxx<\/code> (Discord)<\/li>\n\n\n\n<li><code>identifier.steam:1100001xxxxxxxx<\/code> (Steam\/HEX) \u2190 legacy<\/li>\n<\/ul>\n\n\n\n<p class=\"wp-block-paragraph\"><strong>Minimal safe pattern<\/strong> in <code>server.cfg<\/code>:<\/p>\n\n\n\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"generic\" data-enlighter-theme=\"\" data-enlighter-highlight=\"\" data-enlighter-linenumbers=\"\" data-enlighter-lineoffset=\"\" data-enlighter-title=\"\" data-enlighter-group=\"\">## Permissions\nadd_ace group.admin command allow                 # allow all commands for admin group\nadd_ace resource.qb-core command allow            # allow framework to run commands (QBCore example)\n\n# Inheritance (QBCore example)\nadd_ace qbcore.god command allow\nadd_principal qbcore.god group.admin               # gods inherit admin\nadd_principal qbcore.god qbcore.admin\nadd_principal qbcore.admin qbcore.mod\n\n# Players (replace with your license)\nadd_principal identifier.license:YOUR_LICENSE qbcore.god   # you\n<\/pre>\n\n\n\n<blockquote class=\"wp-block-quote is-layout-flow wp-block-quote-is-layout-flow\">\n<p class=\"wp-block-paragraph\">After saving, <strong>restart the server<\/strong>. You should now access your admin menu\/commands. Once bootstrapped, use in\u2011game tools to manage staff.<\/p>\n<\/blockquote>\n\n\n\n<hr class=\"wp-block-separator has-alpha-channel-opacity\"\/>\n\n\n\n<h2 class=\"wp-block-heading\">Framework\u2011Specific Setup<\/h2>\n\n\n\n<h3 class=\"wp-block-heading\">QBCore: Grant Admin via ACE (Recommended)<\/h3>\n\n\n\n<ol class=\"wp-block-list\">\n<li><strong>Open<\/strong> <code>server.cfg<\/code> (or txAdmin \u2192 <em>CFG Editor<\/em>).<\/li>\n\n\n\n<li><strong>Ensure<\/strong> the permissions block exists (see above).<\/li>\n\n\n\n<li><strong>Add<\/strong> your principal: <code>add_principal identifier.license:YOUR_LICENSE qbcore.god # or qbcore.admin<\/code><\/li>\n\n\n\n<li><strong>Restart<\/strong> the server.<\/li>\n\n\n\n<li><strong>Verify<\/strong> in\u2011game: <code>\/admin<\/code> \u2192 Player Management \u2192 Permissions.<\/li>\n\n\n\n<li>(Optional) Use the command: <code>\/addpermission [id] god<\/code><\/li>\n<\/ol>\n\n\n\n<p class=\"wp-block-paragraph\"><strong>Notes<\/strong><\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li>Prefer <code>license:<\/code> over <code>steam:<\/code>; it\u2019s more consistent in 2025.<\/li>\n\n\n\n<li>Keep day\u2011to\u2011day role at <code>admin<\/code>; reserve <code>god<\/code> for founders\/tech.<\/li>\n\n\n\n<li>If permissions don\u2019t \u201cstick\u201d, you likely edited the <em>wrong<\/em> CFG or placed entries above an auto\u2011generated txAdmin block. Put your lines <strong>at the end<\/strong> of <code>server.cfg<\/code>.<\/li>\n<\/ul>\n\n\n\n<hr class=\"wp-block-separator has-alpha-channel-opacity\"\/>\n\n\n\n<h3 class=\"wp-block-heading\">ESX: Set Group via Command or Database<\/h3>\n\n\n\n<p class=\"wp-block-paragraph\"><strong>Highest default group in modern ESX is <code>admin<\/code>.<\/strong><\/p>\n\n\n\n<p class=\"wp-block-paragraph\"><strong>Method A \u2014 In\u2011game (recommended):<\/strong><\/p>\n\n\n\n<ol class=\"wp-block-list\">\n<li>Find your <strong>ServerID<\/strong> (e.g., via scoreboard or <code>\/id<\/code>).<\/li>\n\n\n\n<li>Run command in console or as an admin with RCON: <code>\/setgroup [ServerID] admin<\/code><\/li>\n\n\n\n<li>Re\u2011log once to refresh.<\/li>\n<\/ol>\n\n\n\n<p class=\"wp-block-paragraph\"><strong>Method B \u2014 Database:<\/strong><\/p>\n\n\n\n<ol class=\"wp-block-list\">\n<li>Open your database \u2192 table <strong><code>users<\/code><\/strong>.<\/li>\n\n\n\n<li>Find your row by identifier.<\/li>\n\n\n\n<li>Set column <strong><code>group<\/code><\/strong> to <code>admin<\/code>.<\/li>\n\n\n\n<li>Restart your server.<\/li>\n<\/ol>\n\n\n\n<p class=\"wp-block-paragraph\"><strong>Common pitfalls<\/strong><\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li>Using <code>superadmin<\/code> on recent ESX builds: not valid; use <code>admin<\/code>.<\/li>\n\n\n\n<li>Wrong identifier (Steam vs license). Use the same identifier ESX stores.<\/li>\n<\/ul>\n\n\n\n<hr class=\"wp-block-separator has-alpha-channel-opacity\"\/>\n\n\n\n<h3 class=\"wp-block-heading\">vRP (1.x\/\u201cDunko\u201d style) : Add Yourself to a Group<\/h3>\n\n\n\n<p class=\"wp-block-paragraph\">vRP uses its own <strong>groups<\/strong> (defined in <code>vrp\/cfg\/groups.lua<\/code>), stored per user.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\"><strong>Method A \u2014 In\u2011game menu:<\/strong><\/p>\n\n\n\n<ol class=\"wp-block-list\">\n<li>Open vRP admin menu.<\/li>\n\n\n\n<li>Choose <strong>Admin \u2192 @Add_Group<\/strong>.<\/li>\n\n\n\n<li>Enter your <strong>vRP <code>user_id<\/code><\/strong> (not your temporary server ID).<\/li>\n\n\n\n<li>Enter group name, e.g., <code>admin<\/code> (or <code>superadmin<\/code> if your config defines it).<\/li>\n\n\n\n<li>Confirm, then re\u2011log.<\/li>\n<\/ol>\n\n\n\n<p class=\"wp-block-paragraph\"><strong>Method B \u2014 Database (vRP 1.x):<\/strong><\/p>\n\n\n\n<ol class=\"wp-block-list\">\n<li>In the DB, open <strong><code>vrp_user_groups<\/code><\/strong>.<\/li>\n\n\n\n<li>Insert: <code>user_id = YOUR_VRP_ID<\/code>, <code>group = 'admin'<\/code> (or <code>'superadmin'<\/code> if your server uses it).<\/li>\n\n\n\n<li>Restart the server.<\/li>\n<\/ol>\n\n\n\n<blockquote class=\"wp-block-quote is-layout-flow wp-block-quote-is-layout-flow\">\n<p class=\"wp-block-paragraph\">Group names are <strong>server\u2011specific<\/strong>. Check <code>vrp\/cfg\/groups.lua<\/code> for the exact roles and permissions in your pack.<\/p>\n<\/blockquote>\n\n\n\n<hr class=\"wp-block-separator has-alpha-channel-opacity\"\/>\n\n\n\n<h2 class=\"wp-block-heading\">Operational Responsibilities (What \u201cGood Admin\u201d Looks Like)<\/h2>\n\n\n\n<ul class=\"wp-block-list\">\n<li><strong>Rule enforcement:<\/strong> Apply rules consistently. Document warnings\/kicks\/bans.<\/li>\n\n\n\n<li><strong>Player support:<\/strong> Resolve reports quickly; educate, don\u2019t escalate.<\/li>\n\n\n\n<li><strong>Uptime &amp; performance:<\/strong> Watch console, resource times, and logs; report anomalies.<\/li>\n\n\n\n<li><strong>Auditability:<\/strong> Log all admin actions (Discord webhooks\/txAdmin). Use unique staff accounts.<\/li>\n\n\n\n<li><strong>Least privilege:<\/strong> Use <code>admin<\/code> day\u2011to\u2011day; reserve <code>god<\/code>\/<code>superadmin<\/code> for break\u2011glass scenarios.<\/li>\n<\/ul>\n\n\n\n<p class=\"wp-block-paragraph\">See <strong><a href=\"https:\/\/fivemx.com\/admin-tools\/\">Admin Tools &amp; More<\/a><\/strong> for vetted admin menus, logging, and moderation resources.<\/p>\n\n\n\n<hr class=\"wp-block-separator has-alpha-channel-opacity\"\/>\n\n\n\n<h2 class=\"wp-block-heading\">Security &amp; Compliance Checklist<\/h2>\n\n\n\n<ul class=\"wp-block-list\">\n<li>Written owner approval for each admin.<\/li>\n\n\n\n<li>Use <strong>license:<\/strong> identifiers; avoid Steam\u2011only setups.<\/li>\n\n\n\n<li>Keep <strong>cfg permissions<\/strong> in version control.<\/li>\n\n\n\n<li>Enable <strong>Discord\/txAdmin<\/strong> logging for staff actions.<\/li>\n\n\n\n<li>No shared staff accounts.<\/li>\n\n\n\n<li>Rotate RCON\/txAdmin passwords.<\/li>\n\n\n\n<li>Test staff access on a staging slot before live.<\/li>\n<\/ul>\n\n\n\n<hr class=\"wp-block-separator has-alpha-channel-opacity\"\/>\n\n\n\n<h2 class=\"wp-block-heading\">Troubleshooting<\/h2>\n\n\n\n<figure class=\"wp-block-table\"><table class=\"has-fixed-layout\"><thead><tr><th>Symptom<\/th><th>Likely Cause<\/th><th>Precise Fix<\/th><\/tr><\/thead><tbody><tr><td>No admin after restart<\/td><td>Edited wrong CFG or lines overridden by txAdmin<\/td><td>Put <code>add_principal<\/code> at <strong>end<\/strong> of <code>server.cfg<\/code>. Restart twice.<\/td><\/tr><tr><td>Admin menu opens but no powers<\/td><td>Wrong group (<code>mod<\/code> vs <code>admin<\/code>\/<code>god<\/code>) or wrong identifier type<\/td><td>Use <code>license:<\/code> and match your framework\u2019s group names.<\/td><\/tr><tr><td>ESX group change ignored<\/td><td>Using deprecated <code>superadmin<\/code><\/td><td>Set <code>admin<\/code> via <code>\/setgroup<\/code> or DB; re\u2011log.<\/td><\/tr><tr><td>QBCore perms reset on reboot<\/td><td>Used only <code>\/addpermission<\/code> without ACE<\/td><td>Add persistent <code>add_principal<\/code> lines to <code>server.cfg<\/code>.<\/td><\/tr><tr><td>vRP group not applied<\/td><td>Inserted wrong <code>user_id<\/code> (used temp ID)<\/td><td>Use <strong>vRP <code>user_id<\/code><\/strong> from DB, not server temp ID.<\/td><\/tr><\/tbody><\/table><\/figure>\n\n\n\n<hr class=\"wp-block-separator has-alpha-channel-opacity\"\/>\n\n\n\n<h2 class=\"wp-block-heading\">FAQs<\/h2>\n\n\n\n<p class=\"wp-block-paragraph\"><strong>Do I still need SteamID64?<\/strong><br>No. Use your <strong>Rockstar license<\/strong> for modern setups. Steam may still work if your server tracks it, but it\u2019s legacy.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\"><strong>What\u2019s the difference between <code>admin<\/code> and <code>god<\/code> on QBCore?<\/strong><br><code>god<\/code> is the highest and often inherits all others. Use sparingly.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\"><strong>Can I grant admin without a restart?<\/strong><br>Yes if you use in\u2011game commands\/menus. For <strong>ACE changes<\/strong>, restart is safest.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\"><strong>Is <code>\/setgroup<\/code> safe to use in ESX?<\/strong><br>Yes for modern ESX, but ensure the target group exists (<code>admin<\/code>). Persisting via DB ensures it survives edge cases.<\/p>\n\n\n\n<hr class=\"wp-block-separator has-alpha-channel-opacity\"\/>\n\n\n\n<h2 class=\"wp-block-heading\">Recommended Tools &amp; Next Steps<\/h2>\n\n\n\n<ul class=\"wp-block-list\">\n<li>Install a <strong>modern admin menu<\/strong> with Discord logging, spectate, teleport, and moderation tools.<\/li>\n\n\n\n<li>Enable <strong>txAdmin<\/strong> player monitoring &amp; bans sync.<\/li>\n\n\n\n<li>Set up <strong>Discord webhooks<\/strong> for admin actions (joins, bans, kicks).<\/li>\n\n\n\n<li>Maintain a <strong>staff handbook<\/strong>: escalation ladder, ban durations, appeal process.<\/li>\n<\/ul>\n\n\n\n<blockquote class=\"wp-block-quote is-layout-flow wp-block-quote-is-layout-flow\">\n<p class=\"wp-block-paragraph\">Explore our curated list: <strong><a href=\"https:\/\/fivemx.com\/admin-tools\/\">Admin Tools &amp; More<\/a><\/strong> \u2013 includes vMenu and other vetted resources.<\/p>\n<\/blockquote>\n\n\n\n<hr class=\"wp-block-separator has-alpha-channel-opacity\"\/>\n\n\n\n<h2 class=\"wp-block-heading\">Outbound Resources (further reading)<\/h2>\n\n\n\n<ul class=\"wp-block-list\">\n<li>QBCore permissions guide (ACE, groups, examples).<\/li>\n\n\n\n<li>ESX command reference for <code>\/setgroup<\/code> and admin workflows.<\/li>\n\n\n\n<li>ACE permissions primer (principals &amp; inheritance) for safer configs.<\/li>\n<\/ul>\n\n\n\n<hr class=\"wp-block-separator has-alpha-channel-opacity\"\/>\n\n\n\n<h3 class=\"wp-block-heading\">Copy\u2011Paste Snippets<\/h3>\n\n\n\n<p class=\"wp-block-paragraph\"><strong>QBCore \u2013 Minimal, safe permissions block<\/strong><\/p>\n\n\n\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"generic\" data-enlighter-theme=\"\" data-enlighter-highlight=\"\" data-enlighter-linenumbers=\"\" data-enlighter-lineoffset=\"\" data-enlighter-title=\"\" data-enlighter-group=\"\">## Permissions ##\nadd_ace group.admin command allow\nadd_ace resource.qb-core command allow\n\n# Inheritance\nadd_ace qbcore.god command allow\nadd_principal qbcore.god group.admin\nadd_principal qbcore.god qbcore.admin\nadd_principal qbcore.admin qbcore.mod\n\n# Players\nadd_principal identifier.license:REPLACE_ME qbcore.god  # Your main account\n<\/pre>\n\n\n\n<p class=\"wp-block-paragraph\"><strong>ESX \u2013 Set admin via DB<\/strong><\/p>\n\n\n\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"generic\" data-enlighter-theme=\"\" data-enlighter-highlight=\"\" data-enlighter-linenumbers=\"\" data-enlighter-lineoffset=\"\" data-enlighter-title=\"\" data-enlighter-group=\"\">UPDATE `users`\nSET `group` = 'admin'\nWHERE `identifier` = 'license:REPLACE_ME';\n<\/pre>\n\n\n\n<p class=\"wp-block-paragraph\"><strong>vRP \u2013 Insert admin group (vRP 1.x)<\/strong><\/p>\n\n\n\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"generic\" data-enlighter-theme=\"\" data-enlighter-highlight=\"\" data-enlighter-linenumbers=\"\" data-enlighter-lineoffset=\"\" data-enlighter-title=\"\" data-enlighter-group=\"\">INSERT INTO `vrp_user_groups` (`user_id`, `group`) VALUES (YOUR_VRP_ID, 'admin');\n<\/pre>\n\n\n\n<hr class=\"wp-block-separator has-alpha-channel-opacity\"\/>\n\n\n\n<h2 class=\"wp-block-heading\">Change Log (what\u2019s improved vs. typical guides)<\/h2>\n\n\n\n<ul class=\"wp-block-list\">\n<li>Replaced legacy <strong>Steam\u2011only<\/strong> approach with <strong>license:<\/strong> best practice.<\/li>\n\n\n\n<li>Corrected <strong>QBCore<\/strong> section to use ACE + persistent <code>server.cfg<\/code> entries.<\/li>\n\n\n\n<li>Clarified <strong>ESX<\/strong> highest role (<code>admin<\/code>) and provided safe DB &amp; command paths.<\/li>\n\n\n\n<li>Added <strong>vRP<\/strong> in\u2011game\/DB dual methods and group config pointer.<\/li>\n\n\n\n<li>Included <strong>security checklist<\/strong>, <strong>FAQ<\/strong>, and <strong>ready\u2011to\u2011paste<\/strong> snippets.<\/li>\n<\/ul>\n\n\n\n<hr class=\"wp-block-separator has-alpha-channel-opacity\"\/>\n\n\n\n<p class=\"wp-block-paragraph\"><em>If you need implementation help, paste your <code>server.cfg<\/code> permissions block and I\u2019ll spot\u2011fix it.<\/em><\/p>\n\n\n\n<p class=\"wp-block-paragraph\"><\/p>\n","protected":false},"excerpt":{"rendered":"<p>J\u00e1 sonhou em gerenciar seu pr\u00f3prio servidor FiveM? Obtenha a aprova\u00e7\u00e3o do propriet\u00e1rio, ajuste algumas linhas de configura\u00e7\u00e3o ou entradas no banco de dados e voc\u00ea se tornar\u00e1 um administrador em um piscar de olhos \u2014 pronto para aplicar regras, ajudar os jogadores e manter a comunidade pr\u00f3spera!<\/p>","protected":false},"author":1,"featured_media":59390,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[1899],"tags":[],"class_list":["post-59371","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-tutorials"],"blocksy_meta":[],"_links":{"self":[{"href":"https:\/\/fivemx.com\/pt\/wp-json\/wp\/v2\/posts\/59371","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/fivemx.com\/pt\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/fivemx.com\/pt\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/fivemx.com\/pt\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/fivemx.com\/pt\/wp-json\/wp\/v2\/comments?post=59371"}],"version-history":[{"count":0,"href":"https:\/\/fivemx.com\/pt\/wp-json\/wp\/v2\/posts\/59371\/revisions"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/fivemx.com\/pt\/wp-json\/wp\/v2\/media\/59390"}],"wp:attachment":[{"href":"https:\/\/fivemx.com\/pt\/wp-json\/wp\/v2\/media?parent=59371"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/fivemx.com\/pt\/wp-json\/wp\/v2\/categories?post=59371"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/fivemx.com\/pt\/wp-json\/wp\/v2\/tags?post=59371"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}