[{"data":1,"prerenderedAt":510},["ShallowReactive",2],{"/docs/jobs/firejob/reference/exports/server-removeoilspill":3,"/docs/jobs/firejob/reference/exports/server-removeoilspill-surround":498,"/docs/jobs/firejob/reference/exports/server-removeoilspill-implemented-suggestions":509},{"id":4,"title":5,"body":6,"description":488,"extension":489,"head":490,"implementedSuggestions":490,"meta":491,"navigation":492,"path":493,"schemaOrg":490,"seo":494,"sitemap":495,"stem":496,"__hash__":497},"docs/1.docs/0.jobs/3.firejob/4.reference/3.exports/5.server-removeoilspill.md","Server: RemoveOilSpill(spillId, reason)",{"type":7,"value":8,"toc":483},"minimark",[9,17,30,33,146,160,165,172,192,265,285,293,468,479],[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},"removeoilspillspillid-reason",[26,170,171],{},"RemoveOilSpill(spillId, reason)",[10,173,174,175,178,179,184,185,187,188,191],{},"Immediately removes an active spill and synchronizes the removal. Get ",[26,176,177],{},"spillId"," from the ",[21,180,181,182],{},"second return value of ",[26,183,107],{}," (",[26,186,121],{},"), or from an entry returned by ",[26,189,190],{},"GetOilSpills()",".",[34,193,194,210],{},[37,195,196],{},[40,197,198,201,204,207],{},[43,199,200],{},"Argument",[43,202,203],{},"Type",[43,205,206],{},"Required / default",[43,208,209],{},"Meaning",[53,211,212,240],{},[40,213,214,218,227,230],{},[58,215,216],{},[26,217,177],{},[58,219,220,223,224],{},[26,221,222],{},"string"," or ",[26,225,226],{},"number",[58,228,229],{},"Required",[58,231,232,233,236,237,239],{},"The spill's ",[26,234,235],{},"id",", such as ",[26,238,125],{},"; not a vehicle ID, plate, or array index",[40,241,242,247,251,256],{},[58,243,244],{},[26,245,246],{},"reason",[58,248,249],{},[26,250,222],{},[58,252,253],{},[26,254,255],{},"\"export_removed\"",[58,257,258,259,223,262],{},"Removal reason, for example ",[26,260,261],{},"\"incident_finished\"",[26,263,264],{},"\"scene_reset\"",[10,266,267,268,271,272,275,276,279,280,282,283,191],{},"Returns ",[21,269,270],{},"one boolean",": ",[26,273,274],{},"true"," when an active spill was removed, or ",[26,277,278],{},"false"," if no spill exists for that ID or an ID reset is in progress. There is no second error string. Removing the same spill twice normally returns ",[26,281,274],{}," and then ",[26,284,278],{},[10,286,287,288,292],{},"The ",[13,289,291],{"href":290},"#create-keep-the-id-and-remove-the-spill-later","complete creation example above"," shows where the ID comes from. If your resource needs to find its active spills again, use their origin tag:",[294,295,300],"pre",{"className":296,"code":297,"language":298,"meta":299,"style":299},"language-lua shiki shiki-themes material-theme-lighter material-theme material-theme-palenight","-- server.lua; matches the source tag used in the creation example.\nfor _, spill in ipairs(exports[\"sky_firejob\"]:GetOilSpills()) do\n    if spill.source == \"my_incident_resource\" then\n        local removed = exports[\"sky_firejob\"]:RemoveOilSpill(spill.id, \"scene_reset\")\n        print((\"Remove oil spill %s: %s\"):format(spill.id, tostring(removed)))\n    end\nend\n","lua","",[26,301,302,311,352,379,422,456,462],{"__ignoreMap":299},[303,304,307],"span",{"class":305,"line":306},"line",1,[303,308,310],{"class":309},"sHwdD","-- server.lua; matches the source tag used in the creation example.\n",[303,312,314,318,322,325,329,332,336,339,341,344,346,349],{"class":305,"line":313},2,[303,315,317],{"class":316},"s7zQu","for",[303,319,321],{"class":320},"sTEyZ"," _, spill ",[303,323,324],{"class":316},"in",[303,326,328],{"class":327},"s2Zo4"," ipairs",[303,330,331],{"class":320},"(exports[",[303,333,335],{"class":334},"sMK4o","\"",[303,337,28],{"class":338},"sfazB",[303,340,335],{"class":334},[303,342,343],{"class":320},"]:",[303,345,136],{"class":327},[303,347,348],{"class":320},"()) ",[303,350,351],{"class":316},"do\n",[303,353,355,358,361,364,367,370,373,376],{"class":305,"line":354},3,[303,356,357],{"class":316},"    if",[303,359,360],{"class":320}," spill.",[303,362,154],{"class":363},"sBMFI",[303,365,366],{"class":334}," ==",[303,368,369],{"class":334}," \"",[303,371,372],{"class":338},"my_incident_resource",[303,374,375],{"class":334},"\" ",[303,377,378],{"class":316},"then\n",[303,380,382,385,388,391,394,396,398,400,402,404,407,409,412,414,417,419],{"class":305,"line":381},4,[303,383,384],{"class":334},"        local",[303,386,387],{"class":320}," removed ",[303,389,390],{"class":334},"=",[303,392,393],{"class":320}," exports[",[303,395,335],{"class":334},[303,397,28],{"class":338},[303,399,335],{"class":334},[303,401,343],{"class":320},[303,403,129],{"class":327},[303,405,406],{"class":320},"(spill.",[303,408,235],{"class":363},[303,410,411],{"class":320},", ",[303,413,335],{"class":334},[303,415,416],{"class":338},"scene_reset",[303,418,335],{"class":334},[303,420,421],{"class":320},")\n",[303,423,425,428,431,433,436,438,441,444,446,448,450,453],{"class":305,"line":424},5,[303,426,427],{"class":327},"        print",[303,429,430],{"class":320},"((",[303,432,335],{"class":334},[303,434,435],{"class":338},"Remove oil spill %s: %s",[303,437,335],{"class":334},[303,439,440],{"class":320},"):",[303,442,443],{"class":327},"format",[303,445,406],{"class":320},[303,447,235],{"class":363},[303,449,411],{"class":320},[303,451,452],{"class":327},"tostring",[303,454,455],{"class":320},"(removed)))\n",[303,457,459],{"class":305,"line":458},6,[303,460,461],{"class":316},"    end\n",[303,463,465],{"class":305,"line":464},7,[303,466,467],{"class":316},"end\n",[10,469,470,471,474,475,478],{},"This example removes ",[21,472,473],{},"all"," active spills with that tag. Use the individual saved ID to remove only one. Direct export removal does not perform the absorbent/broom interaction or consume cleanup items. Reserve ",[26,476,477],{},"\"cleaned\""," for normal cleanup completion: that reason can trigger configured rewards and scenario completion.",[480,481,482],"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 .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 .sTEyZ, html code.shiki .sTEyZ{--shiki-light:#90A4AE;--shiki-default:#EEFFFF;--shiki-dark:#BABED8}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 .sfazB, html code.shiki .sfazB{--shiki-light:#91B859;--shiki-default:#C3E88D;--shiki-dark:#C3E88D}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":299,"searchDepth":306,"depth":313,"links":484},[485],{"id":163,"depth":313,"text":164,"children":486},[487],{"id":168,"depth":354,"text":171},"Reference for Server: RemoveOilSpill(spillId, reason) in firejob.","md",null,{},true,"/docs/jobs/firejob/reference/exports/server-removeoilspill",{"title":5,"description":488},{"loc":493},"1.docs/0.jobs/3.firejob/4.reference/3.exports/5.server-removeoilspill","FgbRZh1Mbmupcc0Co4N5JwjAKYRAoHd_JaELOTTr9Fs",[499,504],{"title":500,"path":501,"stem":502,"description":503,"children":-1},"Server: CreateOilSpill(payload, creator, options)","/docs/jobs/firejob/reference/exports/server-createoilspill","1.docs/0.jobs/3.firejob/4.reference/3.exports/4.server-createoilspill","Reference for Server: CreateOilSpill(payload, creator, options) in firejob.",{"title":505,"path":506,"stem":507,"description":508,"children":-1},"Server: GetOilSpills()","/docs/jobs/firejob/reference/exports/server-getoilspills","1.docs/0.jobs/3.firejob/4.reference/3.exports/6.server-getoilspills","Reference for Server: GetOilSpills() in firejob.",[],1791814228851]