[{"data":1,"prerenderedAt":413},["ShallowReactive",2],{"/docs/jobs/firejob/reference/exports/server-getoilspills":3,"/docs/jobs/firejob/reference/exports/server-getoilspills-surround":401,"/docs/jobs/firejob/reference/exports/server-getoilspills-implemented-suggestions":412},{"id":4,"title":5,"body":6,"description":392,"extension":393,"head":394,"implementedSuggestions":394,"meta":395,"navigation":243,"path":396,"schemaOrg":394,"seo":397,"sitemap":398,"stem":399,"__hash__":400},"docs/1.docs/0.jobs/3.firejob/4.reference/3.exports/6.server-getoilspills.md","Server: GetOilSpills()",{"type":7,"value":8,"toc":387},"minimark",[9,17,30,33,146,160,165,172,186,377,383],[10,11,12],"p",{},[13,14,16],"a",{"href":15},"/docs/jobs/firejob/reference/exports","All exports",[10,18,19,20,24,25,29],{},"Call these exports from a ",[21,22,23],"strong",{},"server script"," in your own resource, with ",[26,27,28],"code",{},"sky_firejob"," started. They create or remove an incident when called. Automatic oil leaks after collisions or from wear need Sky Mechanic or another resource that detects the condition and calls Firejob.",[10,31,32],{},"The return formats and IDs differ between fire and oil exports:",[34,35,36,52],"table",{},[37,38,39],"thead",{},[40,41,42,46,49],"tr",{},[43,44,45],"th",{},"Operation",[43,47,48],{},"Return value on success",[43,50,51],{},"ID to keep",[53,54,55,75,101,130],"tbody",{},[40,56,57,63,69],{},[58,59,60],"td",{},[26,61,62],{},"CreateFire",[58,64,65,66],{},"One table: ",[26,67,68],{},"{ success = true, fireId = ..., type = ..., label = ... }",[58,70,71,74],{},[26,72,73],{},"result.fireId",", a numeric fire ID",[40,76,77,82,87],{},[58,78,79],{},[26,80,81],{},"CreateVehicleFire",[58,83,65,84],{},[26,85,86],{},"{ success = true, fireId = ... }",[58,88,89,90,93,94,97,98,100],{},"Keep the ",[21,91,92],{},"vehicle network ID you supplied"," for ",[26,95,96],{},"RemoveVehicleFire","; ",[26,99,73],{}," identifies the fire",[40,102,103,108,117],{},[58,104,105],{},[26,106,107],{},"CreateOilSpill",[58,109,110,113,114],{},[21,111,112],{},"Two values:"," ",[26,115,116],{},"true, spill",[58,118,119,122,123,126,127],{},[26,120,121],{},"spill.id",", a string such as ",[26,124,125],{},"\"17\"",", for ",[26,128,129],{},"RemoveOilSpill",[40,131,132,137,140],{},[58,133,134],{},[26,135,136],{},"GetOilSpills",[58,138,139],{},"An array of spill tables",[58,141,142,143,145],{},"Each entry's ",[26,144,121],{},"; the array index is not the spill ID",[10,147,148,151,152,155,156,159],{},[26,149,150],{},"creator",", where accepted, is a player's current server ID (",[26,153,154],{},"source","). Use ",[26,157,158],{},"0"," or omit it for server-created incidents. It is separate from the vehicle network ID, fire ID, and oil spill ID.",[161,162,164],"h2",{"id":163},"server-exports","Server Exports",[166,167,169],"h3",{"id":168},"getoilspills",[26,170,171],{},"GetOilSpills()",[10,173,174,175,178,179,181,182,185],{},"Takes no arguments and returns an ",[21,176,177],{},"array of all currently active server-side spills",", including both fresh and bound spills. Each entry has the same fields documented under ",[26,180,107],{},". When there are no active spills, the result is an empty table ",[26,183,184],{},"{}",".",[187,188,193],"pre",{"className":189,"code":190,"language":191,"meta":192,"style":192},"language-lua shiki shiki-themes material-theme-lighter material-theme material-theme-palenight","-- server.lua\nlocal spills = exports[\"sky_firejob\"]:GetOilSpills()\n\nfor _, spill in ipairs(spills) do\n    print((\"Spill %s: state=%s, source=%s, position=%.2f, %.2f, %.2f\"):format(\n        spill.id,\n        spill.state,\n        spill.source,\n        spill.coords.x,\n        spill.coords.y,\n        spill.coords.z\n    ))\nend\n","lua","",[26,194,195,204,238,245,267,292,305,315,324,339,353,365,371],{"__ignoreMap":192},[196,197,200],"span",{"class":198,"line":199},"line",1,[196,201,203],{"class":202},"sHwdD","-- server.lua\n",[196,205,207,211,215,218,221,224,227,229,232,235],{"class":198,"line":206},2,[196,208,210],{"class":209},"sMK4o","local",[196,212,214],{"class":213},"sTEyZ"," spills ",[196,216,217],{"class":209},"=",[196,219,220],{"class":213}," exports[",[196,222,223],{"class":209},"\"",[196,225,28],{"class":226},"sfazB",[196,228,223],{"class":209},[196,230,231],{"class":213},"]:",[196,233,136],{"class":234},"s2Zo4",[196,236,237],{"class":213},"()\n",[196,239,241],{"class":198,"line":240},3,[196,242,244],{"emptyLinePlaceholder":243},true,"\n",[196,246,248,252,255,258,261,264],{"class":198,"line":247},4,[196,249,251],{"class":250},"s7zQu","for",[196,253,254],{"class":213}," _, spill ",[196,256,257],{"class":250},"in",[196,259,260],{"class":234}," ipairs",[196,262,263],{"class":213},"(spills) ",[196,265,266],{"class":250},"do\n",[196,268,270,273,276,278,281,283,286,289],{"class":198,"line":269},5,[196,271,272],{"class":234},"    print",[196,274,275],{"class":213},"((",[196,277,223],{"class":209},[196,279,280],{"class":226},"Spill %s: state=%s, source=%s, position=%.2f, %.2f, %.2f",[196,282,223],{"class":209},[196,284,285],{"class":213},"):",[196,287,288],{"class":234},"format",[196,290,291],{"class":213},"(\n",[196,293,295,298,302],{"class":198,"line":294},6,[196,296,297],{"class":213},"        spill.",[196,299,301],{"class":300},"sBMFI","id",[196,303,304],{"class":213},",\n",[196,306,308,310,313],{"class":198,"line":307},7,[196,309,297],{"class":213},[196,311,312],{"class":300},"state",[196,314,304],{"class":213},[196,316,318,320,322],{"class":198,"line":317},8,[196,319,297],{"class":213},[196,321,154],{"class":300},[196,323,304],{"class":213},[196,325,327,329,332,334,337],{"class":198,"line":326},9,[196,328,297],{"class":213},[196,330,331],{"class":300},"coords",[196,333,185],{"class":213},[196,335,336],{"class":300},"x",[196,338,304],{"class":213},[196,340,342,344,346,348,351],{"class":198,"line":341},10,[196,343,297],{"class":213},[196,345,331],{"class":300},[196,347,185],{"class":213},[196,349,350],{"class":300},"y",[196,352,304],{"class":213},[196,354,356,358,360,362],{"class":198,"line":355},11,[196,357,297],{"class":213},[196,359,331],{"class":300},[196,361,185],{"class":213},[196,363,364],{"class":300},"z\n",[196,366,368],{"class":198,"line":367},12,[196,369,370],{"class":213},"    ))\n",[196,372,374],{"class":198,"line":373},13,[196,375,376],{"class":250},"end\n",[10,378,379,380,382],{},"Use ",[26,381,121],{}," as the removal ID. The position of an entry in this array can change as spills are added or removed. Re-query when you need current state; editing a returned table is not a supported update API.",[384,385,386],"style",{},"html pre.shiki code .sHwdD, html code.shiki .sHwdD{--shiki-light:#90A4AE;--shiki-light-font-style:italic;--shiki-default:#546E7A;--shiki-default-font-style:italic;--shiki-dark:#676E95;--shiki-dark-font-style:italic}html pre.shiki code .sMK4o, html code.shiki .sMK4o{--shiki-light:#39ADB5;--shiki-default:#89DDFF;--shiki-dark:#89DDFF}html pre.shiki code .sTEyZ, html code.shiki .sTEyZ{--shiki-light:#90A4AE;--shiki-default:#EEFFFF;--shiki-dark:#BABED8}html pre.shiki code .sfazB, html code.shiki .sfazB{--shiki-light:#91B859;--shiki-default:#C3E88D;--shiki-dark:#C3E88D}html pre.shiki code .s2Zo4, html code.shiki .s2Zo4{--shiki-light:#6182B8;--shiki-default:#82AAFF;--shiki-dark:#82AAFF}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 .sBMFI, html code.shiki .sBMFI{--shiki-light:#E2931D;--shiki-default:#FFCB6B;--shiki-dark:#FFCB6B}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":192,"searchDepth":199,"depth":206,"links":388},[389],{"id":163,"depth":206,"text":164,"children":390},[391],{"id":168,"depth":240,"text":171},"Reference for Server: GetOilSpills() in firejob.","md",null,{},"/docs/jobs/firejob/reference/exports/server-getoilspills",{"title":5,"description":392},{"loc":396},"1.docs/0.jobs/3.firejob/4.reference/3.exports/6.server-getoilspills","RcOaf5RljzSNmzkkWo47hZgHUfjs-wXT0VWNmo-lSNA",[402,407],{"title":403,"path":404,"stem":405,"description":406,"children":-1},"Server: RemoveOilSpill(spillId, reason)","/docs/jobs/firejob/reference/exports/server-removeoilspill","1.docs/0.jobs/3.firejob/4.reference/3.exports/5.server-removeoilspill","Reference for Server: RemoveOilSpill(spillId, reason) in firejob.",{"title":408,"path":409,"stem":410,"description":411,"children":-1},"Troubleshooting","/docs/jobs/firejob/troubleshooting","1.docs/0.jobs/3.firejob/5.troubleshooting","Common setup and runtime problems for Sky Fire Job and how to resolve them.",[],1791814228851]