[{"data":1,"prerenderedAt":651},["ShallowReactive",2],{"/docs/jobs/policejob/reference/supported-ffa-scripts":3,"/docs/jobs/policejob/reference/supported-ffa-scripts-surround":638,"/docs/jobs/policejob/reference/supported-ffa-scripts-implemented-suggestions":650},{"id":4,"title":5,"body":6,"description":628,"extension":629,"head":630,"implementedSuggestions":630,"meta":631,"navigation":632,"path":633,"schemaOrg":630,"seo":634,"sitemap":635,"stem":636,"__hash__":637},"docs/1.docs/0.jobs/1.policejob/4.reference/6.supported-ffa-scripts.md","Supported FFA Scripts",{"type":7,"value":8,"toc":608},"minimark",[9,14,23,35,39,65,75,78,97,104,107,127,134,137,156,162,165,184,190,193,212,218,221,240,246,249,269,276,279,299,306,309,329,336,340,346,449,453,474,484,487,491,506,509,565,568,572,588,592,595,604],[10,11,13],"h2",{"id":12},"supported-scripts","Supported scripts",[15,16,17,18,22],"p",{},"Sky Police Job supports the following FFA, paintball, and faction-fight integrations through\n",[19,20,21],"code",{},"Config.Functions.beforeDispatchAlert",".",[15,24,25,26,30,31,34],{},"The integration prevents automatic ",[27,28,29],"strong",{},"Officer down"," and ",[27,32,33],{},"Shots fired"," dispatch alerts while the\nplayer is participating in an FFA or faction fight. Outside these modes, the normal dispatch\nsettings, chance, ignored weapons, cooldowns, and duty checks still apply.",[36,37,38],"h3",{"id":38},"nass_paintball",[40,41,42,49,57],"ul",{},[43,44,45,48],"li",{},[27,46,47],{},"Mode:"," Paintball",[43,50,51,54,55],{},[27,52,53],{},"Resource:"," ",[19,56,38],{},[43,58,59,54,62],{},[27,60,61],{},"State export:",[19,63,64],{},"exports[\"nass_paintball\"]:inGame()",[15,66,67,68,71,72,22],{},"Officer down and shots fired alerts are blocked while ",[19,69,70],{},"inGame()"," returns ",[19,73,74],{},"true",[36,76,77],{"id":77},"pug-paintball",[40,79,80,84,90],{},[43,81,82,48],{},[27,83,47],{},[43,85,86,54,88],{},[27,87,53],{},[19,89,77],{},[43,91,92,54,94],{},[27,93,61],{},[19,95,96],{},"exports[\"pug-paintball\"]:IsInPaintball()",[15,98,67,99,71,102,22],{},[19,100,101],{},"IsInPaintball()",[19,103,74],{},[36,105,106],{"id":106},"hex_ffa",[40,108,109,114,120],{},[43,110,111,113],{},[27,112,47],{}," FFA zone",[43,115,116,54,118],{},[27,117,53],{},[19,119,106],{},[43,121,122,54,124],{},[27,123,61],{},[19,125,126],{},"exports[\"hex_ffa\"]:isInZone()",[15,128,67,129,71,132,22],{},[19,130,131],{},"isInZone()",[19,133,74],{},[36,135,136],{"id":136},"hex_3_ffa",[40,138,139,143,149],{},[43,140,141,113],{},[27,142,47],{},[43,144,145,54,147],{},[27,146,53],{},[19,148,136],{},[43,150,151,54,153],{},[27,152,61],{},[19,154,155],{},"exports[\"hex_3_ffa\"]:isInZone()",[15,157,67,158,71,160,22],{},[19,159,131],{},[19,161,74],{},[36,163,164],{"id":164},"hex_4_ffa",[40,166,167,171,177],{},[43,168,169,113],{},[27,170,47],{},[43,172,173,54,175],{},[27,174,53],{},[19,176,164],{},[43,178,179,54,181],{},[27,180,61],{},[19,182,183],{},"exports[\"hex_4_ffa\"]:isInZone()",[15,185,67,186,71,188,22],{},[19,187,131],{},[19,189,74],{},[36,191,192],{"id":192},"ws_ffa",[40,194,195,199,205],{},[43,196,197,113],{},[27,198,47],{},[43,200,201,54,203],{},[27,202,53],{},[19,204,192],{},[43,206,207,54,209],{},[27,208,61],{},[19,210,211],{},"exports[\"ws_ffa\"]:isInZone()",[15,213,67,214,71,216,22],{},[19,215,131],{},[19,217,74],{},[36,219,220],{"id":220},"ws_ffa-v2",[40,222,223,227,233],{},[43,224,225,113],{},[27,226,47],{},[43,228,229,54,231],{},[27,230,53],{},[19,232,220],{},[43,234,235,54,237],{},[27,236,61],{},[19,238,239],{},"exports[\"ws_ffa-v2\"]:isInZone()",[15,241,67,242,71,244,22],{},[19,243,131],{},[19,245,74],{},[36,247,248],{"id":248},"ws_gangwar-v2",[40,250,251,256,262],{},[43,252,253,255],{},[27,254,47],{}," Gangwar",[43,257,258,54,260],{},[27,259,53],{},[19,261,248],{},[43,263,264,54,266],{},[27,265,61],{},[19,267,268],{},"exports[\"ws_gangwar-v2\"]:isFightActive()",[15,270,67,271,71,274,22],{},[19,272,273],{},"isFightActive()",[19,275,74],{},[36,277,278],{"id":278},"sp_ffa",[40,280,281,286,292],{},[43,282,283,285],{},[27,284,47],{}," FFA",[43,287,288,54,290],{},[27,289,53],{},[19,291,278],{},[43,293,294,54,296],{},[27,295,61],{},[19,297,298],{},"exports[\"sp_ffa\"]:inFFA()",[15,300,67,301,71,304,22],{},[19,302,303],{},"inFFA()",[19,305,74],{},[36,307,308],{"id":308},"sp_frakfights",[40,310,311,316,322],{},[43,312,313,315],{},[27,314,47],{}," Faction fight",[43,317,318,54,320],{},[27,319,53],{},[19,321,308],{},[43,323,324,54,326],{},[27,325,61],{},[19,327,328],{},"exports[\"sp_frakfights\"]:IsFrakFight()",[15,330,67,331,71,334,22],{},[19,332,333],{},"IsFrakFight()",[19,335,74],{},[10,337,339],{"id":338},"generate-the-functionslua-hook","Generate the functions.lua hook",[15,341,342,343,22],{},"Select the scripts installed on your server. The generator prepares the complete hook block for\n",[19,344,345],{},"sky_policejob/config/functions.lua",[347,348,349,353,359,363,366,412,415,419,432,436],"steps",{},[36,350,352],{"id":351},"open-the-original-functionslua","Open the original functions.lua",[15,354,355,356,358],{},"Open ",[19,357,345],{},". Do not delete or replace the complete file.",[36,360,362],{"id":361},"find-the-replacement-start","Find the replacement start",[15,364,365],{},"Start at the comment directly above this function:",[367,368,373],"pre",{"className":369,"code":370,"language":371,"meta":372,"style":372},"language-lua shiki shiki-themes material-theme-lighter material-theme material-theme-palenight","Config.Functions.beforeDispatchAlert = function(context)\n","lua","",[19,374,375],{"__ignoreMap":372},[376,377,380,384,388,390,394,398,402,405,409],"span",{"class":378,"line":379},"line",1,[376,381,383],{"class":382},"sTEyZ","Config.",[376,385,387],{"class":386},"sBMFI","Functions",[376,389,22],{"class":382},[376,391,393],{"class":392},"s2Zo4","beforeDispatchAlert",[376,395,397],{"class":396},"sMK4o"," =",[376,399,401],{"class":400},"s7zQu"," function",[376,403,404],{"class":396},"(",[376,406,408],{"class":407},"sHdIc","context",[376,410,411],{"class":396},")\n",[15,413,414],{},"If the function is missing, update Sky Police Job first. The dispatch flow must support the hook\nbefore the generated configuration can take effect.",[36,416,418],{"id":417},"find-the-replacement-end","Find the replacement end",[15,420,421,422,425,426,428,429,431],{},"The replacement ends after the closing ",[19,423,424],{},"end"," of ",[19,427,21],{},".\nKeep all code after that closing ",[19,430,424],{},", including garage helpers and the other functions.",[36,433,435],{"id":434},"generate-and-paste","Generate and paste",[15,437,438,439,441,442,445,446,22],{},"Select the installed scripts below, copy the generated configuration, and replace only the marked\n",[19,440,393],{}," section. Restart ",[19,443,444],{},"sky_policejob"," after saving ",[19,447,448],{},"functions.lua",[450,451],"ffa-script-generator",{"job":452},"police",[454,455,456],"warning",{},[15,457,458,459,462,463,466,467,462,470,473],{},"Keep ",[19,460,461],{},"Config.Functions.HasDispatch",", ",[19,464,465],{},"Config.Functions.CreateDispatch",",\n",[19,468,469],{},"Config.Functions.OpenImpoundForm",[19,471,472],{},"Config.Functions.StoreVehicle",", and every other function\noutside the marked replacement range unchanged.",[15,475,476,477,480,481,483],{},"Returning ",[19,478,479],{},"false"," from ",[19,482,393],{}," suppresses the current automatic officer down or shots\nfired alert. The hook runs on the affected player's client, so it can use the same FFA state exports\nas the Ambulance integration. It is read again for each eligible alert; do not cache the result of\nan FFA export outside the function.",[15,485,486],{},"The generated resource-state checks ensure that only installed and running integrations are called.\nEach selected mode is checked independently: being outside one running FFA does not prevent an\nactive gangwar or another selected mode from blocking the alerts.",[10,488,490],{"id":489},"job-configurator-and-alert-types","Job Configurator and alert types",[15,492,493,494,497,498,501,502,505],{},"The Lua hook stays in ",[19,495,496],{},"config/functions.lua"," even when ",[19,499,500],{},"/jobconfig"," is enabled. Continue using\n",[27,503,504],{},"Police Jobs → Dispatch"," for the ordinary officer down and shots fired settings. Restart the\nresource after changing Lua code; normal saved dispatch settings still apply live.",[15,507,508],{},"The generated hook blocks both automatic alert types. For a custom filter, the context provides:",[510,511,512,525],"table",{},[513,514,515],"thead",{},[516,517,518,522],"tr",{},[519,520,521],"th",{},"Field",[519,523,524],{},"Meaning",[526,527,528,545,555],"tbody",{},[516,529,530,536],{},[531,532,533],"td",{},[19,534,535],{},"context.alertType",[531,537,538,541,542,22],{},[19,539,540],{},"\"officerDown\""," or ",[19,543,544],{},"\"shotsFired\"",[516,546,547,552],{},[531,548,549],{},[19,550,551],{},"context.playerPed",[531,553,554],{},"The local player's current ped handle.",[516,556,557,562],{},[531,558,559],{},[19,560,561],{},"context.weaponHash",[531,563,564],{},"The weapon hash for shots fired; absent for officer down.",[15,566,567],{},"Keep custom checks synchronous. A blocked shots fired alert does not consume the dispatch cooldown.\nOfficer down is still limited to an on-duty police officer and is sent at most once for the same\ndeath. The hook controls these automatic alerts; other dispatch creation keeps its existing flow.",[10,569,571],{"id":570},"using-sky-ambulance-job-alongside-police-job","Using Sky Ambulance Job alongside Police Job",[15,573,574,575,580,581,583,584,22],{},"The Police hook controls dispatch alerts. To also suppress the Ambulance death screen and injuries,\nconfigure the ",[576,577,579],"a",{"href":578},"/docs/jobs/ambulancejob/reference/supported-ffa-scripts","Ambulance FFA hooks",".\nServers using ",[19,582,278],{}," with Sky Ambulance Job should also follow that page's\n",[576,585,587],{"href":586},"/docs/jobs/ambulancejob/reference/supported-ffa-scripts#sp_ffa-update-the-revive-callback","revive callback instructions",[10,589,591],{"id":590},"support","Support",[15,593,594],{},"Need help? Our support team is always ready to assist",[596,597],"u-button",{"color":598,"icon":599,"label":600,"target":601,"to":602,"variant":603},"neutral","i-simple-icons-discord","Join Discord","_blank","https://discord.gg/sky-systems","subtle",[605,606,607],"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 .s2Zo4, html code.shiki .s2Zo4{--shiki-light:#6182B8;--shiki-default:#82AAFF;--shiki-dark:#82AAFF}html pre.shiki code .sMK4o, html code.shiki .sMK4o{--shiki-light:#39ADB5;--shiki-default:#89DDFF;--shiki-dark:#89DDFF}html pre.shiki code .s7zQu, html code.shiki .s7zQu{--shiki-light:#39ADB5;--shiki-light-font-style:italic;--shiki-default:#89DDFF;--shiki-default-font-style:italic;--shiki-dark:#89DDFF;--shiki-dark-font-style:italic}html pre.shiki code .sHdIc, html code.shiki .sHdIc{--shiki-light:#90A4AE;--shiki-light-font-style:italic;--shiki-default:#EEFFFF;--shiki-default-font-style:italic;--shiki-dark:#BABED8;--shiki-dark-font-style:italic}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);}",{"title":372,"searchDepth":379,"depth":609,"links":610},2,[611,624,625,626,627],{"id":12,"depth":609,"text":13,"children":612},[613,615,616,617,618,619,620,621,622,623],{"id":38,"depth":614,"text":38},3,{"id":77,"depth":614,"text":77},{"id":106,"depth":614,"text":106},{"id":136,"depth":614,"text":136},{"id":164,"depth":614,"text":164},{"id":192,"depth":614,"text":192},{"id":220,"depth":614,"text":220},{"id":248,"depth":614,"text":248},{"id":278,"depth":614,"text":278},{"id":308,"depth":614,"text":308},{"id":338,"depth":609,"text":339},{"id":489,"depth":609,"text":490},{"id":570,"depth":609,"text":571},{"id":590,"depth":609,"text":591},"Integrate supported FFA and faction-fight scripts with the Sky Police Job officer down and shots fired dispatch alerts.","md",null,{},true,"/docs/jobs/policejob/reference/supported-ffa-scripts",{"title":5,"description":628},{"loc":633},"1.docs/0.jobs/1.policejob/4.reference/6.supported-ffa-scripts","1Ytm0dWhEX3MSKJDPrSp9rx_m6LXVMqW3ADfee0PN7o",[639,644],{"title":640,"path":641,"stem":642,"description":643,"children":-1},"FAQ","/docs/jobs/policejob/reference/faq","1.docs/0.jobs/1.policejob/4.reference/5.faq","Frequently asked questions about the Sky Police Job resource.",{"title":645,"path":646,"stem":647,"description":648,"icon":649,"children":-1},"Changelog","/docs/jobs/policejob/changelog","1.docs/0.jobs/1.policejob/5.changelog","Full change history for Sky Police Job.","i-lucide-history",[],1791635912217]