[{"data":1,"prerenderedAt":835},["ShallowReactive",2],{"/docs/jobs/policejob/permissions":3,"/docs/jobs/policejob/permissions-surround":824},{"id":4,"title":5,"body":6,"description":814,"extension":815,"head":816,"meta":817,"navigation":818,"path":819,"schemaOrg":816,"seo":820,"sitemap":821,"stem":822,"__hash__":823},"docs/1.docs/0.jobs/1.policejob/2.permissions.md","Permissions",{"type":7,"value":8,"toc":796},"minimark",[9,40,45,71,145,155,159,168,187,198,215,229,243,252,259,274,280,298,318,321,329,344,370,377,390,393,399,402,459,466,479,482,489,515,518,522,537,597,604,608,637,643,652,658,671,679,683,777,780,783,792],[10,11,12],"warning",{},[13,14,15,19,20,25,26,25,30,34,35,39],"p",{},[16,17,18],"strong",{},"Admin command not working?"," You are almost certainly missing the admin group in your framework. Jump to your framework below — ",[21,22,24],"a",{"href":23},"#qbox-principal-prefix-group","QBox",", ",[21,27,29],{"href":28},"#qbcore-principal-prefix-qbcore","QBCore",[21,31,33],{"href":32},"#esx-legacy-users-group","ESX",", or ",[21,36,38],{"href":37},"#vrp","vRP",".",[41,42,44],"h2",{"id":43},"how-sky-detects-admins","How Sky detects admins",[13,46,47,48,25,52,25,55,58,59,62,63,66,67,70],{},"Every admin command (",[49,50,51],"code",{},"/setboss",[49,53,54],{},"/stationcreator",[49,56,57],{},"/jailcreator",", …) calls ",[49,60,61],{},"Sky.FW.IsAdmin(src)",". That function asks your framework whether the player belongs to one of the groups listed in ",[49,64,65],{},"Config.AdminGroups"," in ",[49,68,69],{},"sky_base/config/config.lua",":",[72,73,78],"pre",{"className":74,"code":75,"filename":69,"language":76,"meta":77,"style":77},"language-lua shiki shiki-themes material-theme-lighter material-theme material-theme-palenight","Config.AdminGroups = {\n    \"god\",\n    \"superadmin\",\n    \"admin\"\n}\n","lua","",[49,79,80,100,116,128,139],{"__ignoreMap":77},[81,82,85,89,93,97],"span",{"class":83,"line":84},"line",1,[81,86,88],{"class":87},"sTEyZ","Config.",[81,90,92],{"class":91},"sBMFI","AdminGroups",[81,94,96],{"class":95},"sMK4o"," =",[81,98,99],{"class":87}," {\n",[81,101,103,106,110,113],{"class":83,"line":102},2,[81,104,105],{"class":95},"    \"",[81,107,109],{"class":108},"sfazB","god",[81,111,112],{"class":95},"\"",[81,114,115],{"class":87},",\n",[81,117,119,121,124,126],{"class":83,"line":118},3,[81,120,105],{"class":95},[81,122,123],{"class":108},"superadmin",[81,125,112],{"class":95},[81,127,115],{"class":87},[81,129,131,133,136],{"class":83,"line":130},4,[81,132,105],{"class":95},[81,134,135],{"class":108},"admin",[81,137,138],{"class":95},"\"\n",[81,140,142],{"class":83,"line":141},5,[81,143,144],{"class":87},"}\n",[13,146,147,148,151,152,39],{},"If the check returns ",[49,149,150],{},"false",", the command responds with a \"No permission\" notification. Fixing that means putting the player into one of the listed groups ",[16,153,154],{},"the way your framework expects it",[41,156,158],{"id":157},"framework-setup","Framework setup",[160,161,163,164,167],"h3",{"id":162},"qbox-principal-prefix-group","QBox (principal prefix: ",[49,165,166],{},"group.",")",[13,169,170,171,174,175,178,179,182,183,186],{},"Qbox relies on FiveM ACE through ox_lib's ",[49,172,173],{},"lib.addCommand({ restricted = 'group.admin' })",". Use the ",[49,176,177],{},"group.\u003Cname>"," prefix — there is no ",[49,180,181],{},"qbox."," prefix. The legacy ",[49,184,185],{},"qbx_core:HasPermission"," export is deprecated since qbx_core v1.8.0.",[13,188,189,190,193,194,197],{},"Add the following to your ",[49,191,192],{},"server.cfg"," (or ",[49,195,196],{},"permissions.cfg","):",[72,199,203],{"className":200,"code":201,"filename":192,"language":202,"meta":77,"style":77},"language-cfg shiki shiki-themes material-theme-lighter material-theme material-theme-palenight","add_ace group.admin command allow\nadd_principal identifier.license:\u003Clicense> group.admin\n","cfg",[49,204,205,210],{"__ignoreMap":77},[81,206,207],{"class":83,"line":84},[81,208,209],{},"add_ace group.admin command allow\n",[81,211,212],{"class":83,"line":102},[81,213,214],{},"add_principal identifier.license:\u003Clicense> group.admin\n",[13,216,217,218,221,222,225,226,228],{},"Replace ",[49,219,220],{},"\u003Clicense>"," with the player's license. Find it via txAdmin, the console ",[49,223,224],{},"players"," list, or the ",[49,227,224],{}," DB table.",[13,230,231,232,234,235,238,239,242],{},"After editing ",[49,233,192],{},", run ",[49,236,237],{},"refresh"," and ",[49,240,241],{},"load permissions"," in the console — or restart the server — before the player reconnects.",[13,244,245,246,39],{},"Reference: ",[21,247,251],{"href":248,"rel":249},"https://github.com/Qbox-project/txAdminRecipe/blob/main/permissions.cfg",[250],"nofollow","Qbox txAdmin permissions recipe",[160,253,255,256,167],{"id":254},"qbcore-principal-prefix-qbcore","QBCore (principal prefix: ",[49,257,258],{},"qbcore.",[13,260,261,264,265,267,268,273],{},[49,262,263],{},"QBCore.Functions.HasPermission"," wraps FiveM ACE, and QBCore registers its principals under the ",[49,266,258],{}," prefix. The ",[21,269,272],{"href":270,"rel":271},"https://docs.qbcore.org/qbcore-documentation/guides/setting-permissions",[250],"official docs"," state:",[275,276,277],"blockquote",{},[13,278,279],{},"qbcore.god and group.admin share the same permissions — you can use either one.",[13,281,282,283,286,287,289,290,297],{},"In practice the ",[49,284,285],{},"group.*"," alias is not always wired up depending on QBCore version and the state of your ",[49,288,196],{},". ",[16,291,292,293,296],{},"Prefer the ",[49,294,295],{},"qbcore.*"," prefix"," — it works consistently.",[72,299,301],{"className":200,"code":300,"filename":192,"language":202,"meta":77,"style":77},"add_ace qbcore.god command allow\nadd_principal identifier.license:\u003Clicense> qbcore.god\nadd_principal identifier.license:\u003Clicense> qbcore.admin\n",[49,302,303,308,313],{"__ignoreMap":77},[81,304,305],{"class":83,"line":84},[81,306,307],{},"add_ace qbcore.god command allow\n",[81,309,310],{"class":83,"line":102},[81,311,312],{},"add_principal identifier.license:\u003Clicense> qbcore.god\n",[81,314,315],{"class":83,"line":118},[81,316,317],{},"add_principal identifier.license:\u003Clicense> qbcore.admin\n",[13,319,320],{},"Or, if an existing admin is already online, use the built-in command in-game:",[72,322,327],{"className":323,"code":325,"language":326},[324],"language-text","/addpermission 1 god\n","text",[49,328,325],{"__ignoreMap":77},[13,330,331,332,335,336,338,339,238,341,39],{},"…where ",[49,333,334],{},"1"," is the target player's server ID. Granting ",[49,337,109],{}," implies ",[49,340,135],{},[49,342,343],{},"mod",[10,345,346],{},[13,347,348,349,352,353,356,357,359,360,362,363,366,367,39],{},"Do ",[16,350,351],{},"not"," rely on ",[49,354,355],{},"group.admin"," alone on QBCore. If ",[49,358,51],{}," says \"no permission\" after setting ",[49,361,355],{},", switch to ",[49,364,365],{},"qbcore.admin"," / ",[49,368,369],{},"qbcore.god",[160,371,373,374,167],{"id":372},"esx-legacy-usersgroup","ESX Legacy (",[49,375,376],{},"users.group",[13,378,379,380,382,383,25,386,25,388,39],{},"ESX Legacy stores the admin group on the ",[49,381,376],{}," DB column. Default groups are ",[49,384,385],{},"user",[49,387,135],{},[49,389,123],{},[13,391,392],{},"In-game (requires an existing admin):",[72,394,397],{"className":395,"code":396,"language":326},[324],"/setgroup 1 admin\n",[49,398,396],{"__ignoreMap":77},[13,400,401],{},"Or via SQL:",[72,403,407],{"className":404,"code":405,"language":406,"meta":77,"style":77},"language-sql shiki shiki-themes material-theme-lighter material-theme material-theme-palenight","UPDATE users SET `group` = 'admin' WHERE identifier = 'license:\u003Clicense>';\n","sql",[49,408,409],{"__ignoreMap":77},[81,410,411,415,418,421,424,427,430,432,435,437,440,443,446,449,451,454,456],{"class":83,"line":84},[81,412,414],{"class":413},"sbssI","UPDATE",[81,416,417],{"class":87}," users ",[81,419,420],{"class":413},"SET",[81,422,423],{"class":95}," `",[81,425,426],{"class":108},"group",[81,428,429],{"class":95},"`",[81,431,96],{"class":95},[81,433,434],{"class":95}," '",[81,436,135],{"class":108},[81,438,439],{"class":95},"'",[81,441,442],{"class":413}," WHERE",[81,444,445],{"class":87}," identifier ",[81,447,448],{"class":95},"=",[81,450,434],{"class":95},[81,452,453],{"class":108},"license:\u003Clicense>",[81,455,439],{"class":95},[81,457,458],{"class":87},";\n",[13,460,461,462,465],{},"The player must reconnect for ",[49,463,464],{},"xPlayer.getGroup()"," to pick up the new value.",[13,467,468,469,25,474,39],{},"References: ",[21,470,473],{"href":471,"rel":472},"https://documentation.esx-framework.org/legacy/Commands/setgroup/",[250],"ESX /setgroup",[21,475,478],{"href":476,"rel":477},"https://documentation.esx-framework.org/legacy/Commands/principals/",[250],"ESX principals",[160,480,38],{"id":481},"vrp",[13,483,484,485,488],{},"Groups are defined in ",[49,486,487],{},"cfg/groups.lua"," and granted with:",[72,490,492],{"className":74,"code":491,"language":76,"meta":77,"style":77},"vRP.addUserGroup(user_id, \"admin\")\n",[49,493,494],{"__ignoreMap":77},[81,495,496,499,503,506,508,510,512],{"class":83,"line":84},[81,497,498],{"class":87},"vRP.",[81,500,502],{"class":501},"s2Zo4","addUserGroup",[81,504,505],{"class":87},"(user_id, ",[81,507,112],{"class":95},[81,509,135],{"class":108},[81,511,112],{"class":95},[81,513,514],{"class":87},")\n",[13,516,517],{},"Use the admin command that ships with your vRP build (typically in a vRP base menu).",[41,519,521],{"id":520},"custom-admin-groups","Custom admin groups",[13,523,524,525,25,528,25,531,534,535,70],{},"If you use groups outside the default set (for example ",[49,526,527],{},"owner",[49,529,530],{},"support",[49,532,533],{},"dev","), add them to ",[49,536,65],{},[72,538,540],{"className":74,"code":539,"filename":69,"language":76,"meta":77,"style":77},"Config.AdminGroups = {\n    \"god\",\n    \"superadmin\",\n    \"admin\",\n    \"owner\",\n}\n",[49,541,542,552,562,572,582,592],{"__ignoreMap":77},[81,543,544,546,548,550],{"class":83,"line":84},[81,545,88],{"class":87},[81,547,92],{"class":91},[81,549,96],{"class":95},[81,551,99],{"class":87},[81,553,554,556,558,560],{"class":83,"line":102},[81,555,105],{"class":95},[81,557,109],{"class":108},[81,559,112],{"class":95},[81,561,115],{"class":87},[81,563,564,566,568,570],{"class":83,"line":118},[81,565,105],{"class":95},[81,567,123],{"class":108},[81,569,112],{"class":95},[81,571,115],{"class":87},[81,573,574,576,578,580],{"class":83,"line":130},[81,575,105],{"class":95},[81,577,135],{"class":108},[81,579,112],{"class":95},[81,581,115],{"class":87},[81,583,584,586,588,590],{"class":83,"line":141},[81,585,105],{"class":95},[81,587,527],{"class":108},[81,589,112],{"class":95},[81,591,115],{"class":87},[81,593,595],{"class":83,"line":594},6,[81,596,144],{"class":87},[13,598,599,600,603],{},"Then grant the group the same way as above (e.g. ",[49,601,602],{},"add_principal identifier.license:\u003Clicense> group.owner"," on Qbox).",[41,605,607],{"id":606},"per-command-overrides","Per-command overrides",[10,609,610],{},[13,611,612,613,615,616,619,620,25,622,25,624,25,626,25,629,632,633,636],{},"Unlike the Ambulance resource, Police does ",[16,614,351],{}," ship with a ",[49,617,618],{},"Config.CommandPermissions"," table. Every police admin command (",[49,621,51],{},[49,623,54],{},[49,625,57],{},[49,627,628],{},"/socialworkcreator",[49,630,631],{},"/impoundcreator",") goes through ",[49,634,635],{},"Sky.FW.IsAdmin"," directly. Restrict access through your framework's group system as described above.",[41,638,640,641],{"id":639},"activating-the-boss-menu-with-setboss","Activating the boss menu with ",[49,642,51],{},[13,644,645,646,648,649,70],{},"Once your admin group is working, run ",[49,647,51],{}," to grant every permission (boss menu, wholesale, vehicle shop, member management, …) to a specific job grade. For police with a top grade of ",[49,650,651],{},"5",[72,653,656],{"className":654,"code":655,"language":326},[324],"/setboss police 5\n",[49,657,655],{"__ignoreMap":77},[13,659,660,661,664,665,668,669,39],{},"This writes ",[49,662,663],{},"Permission.ALL"," to the ",[49,666,667],{},"sky_job_permissions"," row for that job and grade. Only run it once per fresh install or after wiping ",[49,670,667],{},[13,672,673,674,678],{},"See the ",[21,675,677],{"href":676},"./commands","Commands"," page for the full admin command list.",[41,680,682],{"id":681},"troubleshooting","Troubleshooting",[684,685,686,695,711,725,742,760],"accordion",{},[13,687,688,689,691,692,694],{},"::accordion-item{label=\"Command says \"No permission\"\"}\nGroup not set, typo in the principal, or wrong prefix for your framework. QBCore wants ",[49,690,365],{},"; Qbox wants ",[49,693,355],{},". Double-check the framework section above.\n::",[696,697,699],"accordion-item",{"label":698},"I granted the group but still no access",[13,700,701,702,704,705,707,708,710],{},"The player must reconnect after the change. On ",[49,703,192],{}," edits, also run ",[49,706,237],{}," + ",[49,709,241],{}," in the console or restart the server.",[696,712,714],{"label":713},"I use a custom group like owner",[13,715,716,717,66,719,721,722,603],{},"Add it to ",[49,718,65],{},[49,720,69],{},", then grant the group the same way (e.g. ",[49,723,724],{},"add_principal ... group.owner",[696,726,728],{"label":727},"/setboss ran but the boss menu is still empty",[13,729,730,731,734,735,737,738,741],{},"Grade mismatch. The ",[49,732,733],{},"grade"," you passed to ",[49,736,51],{}," must match the value in ",[49,739,740],{},"sky_job_members.grade"," for that employee. Check the DB, or use the highest grade configured for the job.",[696,743,745],{"label":744},"Unknown command: /setboss",[13,746,747,750,751,754,755,66,758,39],{},[49,748,749],{},"sky_jobs_base"," is not running. It must start ",[16,752,753],{},"before"," ",[49,756,757],{},"sky_policejob",[49,759,192],{},[696,761,763],{"label":762},"QBCore: group.admin used to work, now it doesn't",[13,764,765,766,366,768,770,771,773,774,776],{},"Switch to ",[49,767,365],{},[49,769,369],{},". The ",[49,772,285],{}," ↔ ",[49,775,295],{}," alias is not reliable across QBCore versions.",[41,778,779],{"id":530},"Support",[13,781,782],{},"Need help? Our support team is always ready to assist",[784,785],"u-button",{"color":786,"icon":787,"label":788,"target":789,"to":790,"variant":791},"neutral","i-simple-icons-discord","Join Discord","_blank","https://discord.gg/sky-systems","subtle",[793,794,795],"style",{},"html pre.shiki code .sTEyZ, html code.shiki .sTEyZ{--shiki-light:#90A4AE;--shiki-default:#EEFFFF;--shiki-dark:#BABED8}html pre.shiki code .sBMFI, html code.shiki .sBMFI{--shiki-light:#E2931D;--shiki-default:#FFCB6B;--shiki-dark:#FFCB6B}html pre.shiki code .sMK4o, html code.shiki .sMK4o{--shiki-light:#39ADB5;--shiki-default:#89DDFF;--shiki-dark:#89DDFF}html pre.shiki code .sfazB, html code.shiki .sfazB{--shiki-light:#91B859;--shiki-default:#C3E88D;--shiki-dark:#C3E88D}html .light .shiki span {color: var(--shiki-light);background: var(--shiki-light-bg);font-style: var(--shiki-light-font-style);font-weight: var(--shiki-light-font-weight);text-decoration: var(--shiki-light-text-decoration);}html.light .shiki span {color: var(--shiki-light);background: var(--shiki-light-bg);font-style: var(--shiki-light-font-style);font-weight: var(--shiki-light-font-weight);text-decoration: var(--shiki-light-text-decoration);}html .default .shiki span {color: var(--shiki-default);background: var(--shiki-default-bg);font-style: var(--shiki-default-font-style);font-weight: var(--shiki-default-font-weight);text-decoration: var(--shiki-default-text-decoration);}html .shiki span {color: var(--shiki-default);background: var(--shiki-default-bg);font-style: var(--shiki-default-font-style);font-weight: var(--shiki-default-font-weight);text-decoration: var(--shiki-default-text-decoration);}html .dark .shiki span {color: var(--shiki-dark);background: var(--shiki-dark-bg);font-style: var(--shiki-dark-font-style);font-weight: var(--shiki-dark-font-weight);text-decoration: var(--shiki-dark-text-decoration);}html.dark .shiki span {color: var(--shiki-dark);background: var(--shiki-dark-bg);font-style: var(--shiki-dark-font-style);font-weight: var(--shiki-dark-font-weight);text-decoration: var(--shiki-dark-text-decoration);}html pre.shiki code .sbssI, html code.shiki .sbssI{--shiki-light:#F76D47;--shiki-default:#F78C6C;--shiki-dark:#F78C6C}html pre.shiki code .s2Zo4, html code.shiki .s2Zo4{--shiki-light:#6182B8;--shiki-default:#82AAFF;--shiki-dark:#82AAFF}",{"title":77,"searchDepth":84,"depth":102,"links":797},[798,799,808,809,810,812,813],{"id":43,"depth":102,"text":44},{"id":157,"depth":102,"text":158,"children":800},[801,803,805,807],{"id":162,"depth":118,"text":802},"QBox (principal prefix: group.)",{"id":254,"depth":118,"text":804},"QBCore (principal prefix: qbcore.)",{"id":372,"depth":118,"text":806},"ESX Legacy (users.group)",{"id":481,"depth":118,"text":38},{"id":520,"depth":102,"text":521},{"id":606,"depth":102,"text":607},{"id":639,"depth":102,"text":811},"Activating the boss menu with /setboss",{"id":681,"depth":102,"text":682},{"id":530,"depth":102,"text":779},"Grant admin access so commands like /setboss and /jailcreator work in your framework.","md",null,{},true,"/docs/jobs/policejob/permissions",{"title":5,"description":814},{"loc":819},"1.docs/0.jobs/1.policejob/2.permissions","mtyRuP9jMyyWOXOYp12VCZ-CEzvXpD3Vo_XCXPM2ox8",[825,830],{"title":826,"path":827,"stem":828,"description":829,"children":-1},"Installation","/docs/jobs/policejob/installation","1.docs/0.jobs/1.policejob/1.installation","Follow these steps to prepare your server for the Sky Police Job script, from database prep to on-server placement.",{"title":831,"path":832,"stem":833,"description":834,"children":-1},"Exports","/docs/jobs/policejob/exports","1.docs/0.jobs/1.policejob/3.exports","Reference for the ambulance job exports and radial menu actions.",1776270453406]