[{"data":1,"prerenderedAt":824},["ShallowReactive",2],{"/docs/jobs/firejob/reference/exports/server-createvehiclefire":3,"/docs/jobs/firejob/reference/exports/server-createvehiclefire-surround":812,"/docs/jobs/firejob/reference/exports/server-createvehiclefire-implemented-suggestions":823},{"id":4,"title":5,"body":6,"description":803,"extension":804,"head":805,"implementedSuggestions":805,"meta":806,"navigation":687,"path":807,"schemaOrg":805,"seo":808,"sitemap":809,"stem":810,"__hash__":811},"docs/1.docs/0.jobs/3.firejob/4.reference/3.exports/2.server-createvehiclefire.md","Server: CreateVehicleFire(payload, creator, options)",{"type":7,"value":8,"toc":798},"minimark",[9,17,30,33,146,160,165,172,175,440,454,480,487,560,789,794],[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},"createvehiclefirepayload-creator-options",[26,170,171],{},"CreateVehicleFire(payload, creator, options)",[10,173,174],{},"Creates a fire associated with a vehicle, using Firejob's configured fire progression, vehicle state, and explosion behavior.",[34,176,177,193],{},[37,178,179],{},[40,180,181,184,187,190],{},[43,182,183],{},"Argument / payload field",[43,185,186],{},"Type",[43,188,189],{},"Required / default",[43,191,192],{},"Meaning",[53,194,195,212,230,256,274,290,319,336,353,376,404,424],{},[40,196,197,202,206,209],{},[58,198,199],{},[26,200,201],{},"payload",[58,203,204],{},[26,205,34],{},[58,207,208],{},"Required",[58,210,211],{},"Vehicle fire creation data",[40,213,214,219,224,227],{},[58,215,216],{},[26,217,218],{},"payload.netId",[58,220,221],{},[26,222,223],{},"number",[58,225,226],{},"Supply for an attached vehicle fire",[58,228,229],{},"Network ID of the existing vehicle, obtained by your vehicle integration; not an entity handle or plate",[40,231,232,237,246,253],{},[58,233,234],{},[26,235,236],{},"payload.coords",[58,238,239,242,243],{},[26,240,241],{},"{ x, y, z }"," or ",[26,244,245],{},"vector3",[58,247,248,249,252],{},"Optional when ",[26,250,251],{},"netId"," resolves to an existing vehicle",[58,254,255],{},"Fire position; otherwise the vehicle position is used",[40,257,258,263,268,271],{},[58,259,260],{},[26,261,262],{},"payload.plate",[58,264,265],{},[26,266,267],{},"string",[58,269,270],{},"Optional",[58,272,273],{},"Vehicle plate metadata; does not find or select a vehicle",[40,275,276,281,285,287],{},[58,277,278],{},[26,279,280],{},"payload.source",[58,282,283],{},[26,284,267],{},[58,286,270],{},[58,288,289],{},"Description of the origin, such as your resource name",[40,291,292,297,301,306],{},[58,293,294],{},[26,295,296],{},"payload.initialStage",[58,298,299],{},[26,300,267],{},[58,302,303],{},[26,304,305],{},"\"smoke\"",[58,307,308,310,311,314,315,318],{},[26,309,305],{},", ",[26,312,313],{},"\"smallFire\"",", or ",[26,316,317],{},"\"fullFire\"",", when progression is enabled",[40,320,321,326,330,333],{},[58,322,323],{},[26,324,325],{},"payload.smokeDensity",[58,327,328],{},[26,329,223],{},[58,331,332],{},"Config/profile default",[58,334,335],{},"Smoke density; the selected progression stage can override it",[40,337,338,343,347,350],{},[58,339,340],{},[26,341,342],{},"payload.explosionDelaySeconds",[58,344,345],{},[26,346,223],{},[58,348,349],{},"Config default",[58,351,352],{},"Explosion delay in seconds when explosions are enabled; progression can delay the start of this timer",[40,354,355,366,370,373],{},[58,356,357,310,360,310,363],{},[26,358,359],{},"payload.engineHealth",[26,361,362],{},"bodyHealth",[26,364,365],{},"petrolTankHealth",[58,367,368],{},[26,369,223],{},[58,371,372],{},"Config defaults",[58,374,375],{},"Optional vehicle health overrides",[40,377,378,383,387,390],{},[58,379,380],{},[26,381,382],{},"payload.effects",[58,384,385],{},[26,386,34],{},[58,388,389],{},"Profile defaults",[58,391,392,393,396,397,400,401],{},"Optional ",[26,394,395],{},"flame"," and ",[26,398,399],{},"smoke"," catalog IDs; unknown IDs return ",[26,402,403],{},"invalid_effect",[40,405,406,410,414,418],{},[58,407,408],{},[26,409,150],{},[58,411,412],{},[26,413,223],{},[58,415,416],{},[26,417,158],{},[58,419,420,421,423],{},"Player server ID, or ",[26,422,158],{}," for a server-created incident",[40,425,426,431,435,437],{},[58,427,428],{},[26,429,430],{},"options",[58,432,433],{},[26,434,34],{},[58,436,270],{},[58,438,439],{},"Creation context, described below",[10,441,442,443,445,446,449,450,453],{},"For a normal integration, omit ",[26,444,430],{}," or pass ",[26,447,448],{},"{ reason = \"my_resource\" }",". The reason is recorded as the fire's origin. When ",[26,451,452],{},"creator > 0",", normal external creation checks the external-fire enable setting and player distance.",[10,455,456,457,460,461,464,465,468,469,310,472,475,476,479],{},"The optional context flags change behavior: ",[26,458,459],{},"manual = true"," applies manual ignition checks; ",[26,462,463],{},"accident = true"," uses accident scaling and context; ",[26,466,467],{},"scenario = true"," uses scenario context and permits ",[26,470,471],{},"payload.sourceScale",[26,473,474],{},"progressionEnabled",", and ",[26,477,478],{},"explosionEnabled"," overrides. These are trusted server-side integration options, not permissions to forward from client input.",[10,481,482,483,486],{},"The export returns ",[21,484,485],{},"one table",":",[488,489,490,498,528,537],"ul",{},[491,492,493,494,497],"li",{},"Success: ",[26,495,496],{},"{ success = true, fireId = \u003Cnumber> }",".",[491,499,500,501,504,505,310,508,310,511,310,514,310,517,310,520,310,523,475,525,497],{},"Failure: ",[26,502,503],{},"{ success = false, error = \u003Cstring> }",". Errors include ",[26,506,507],{},"disabled",[26,509,510],{},"invalid_coords",[26,512,513],{},"already_burning",[26,515,516],{},"limit",[26,518,519],{},"external_disabled",[26,521,522],{},"too_far",[26,524,403],{},[26,526,527],{},"create_failed",[491,529,530,532,533,536],{},[26,531,513],{}," can include the existing ",[26,534,535],{},"fireId"," when the vehicle is already registered. A nearby-fire rejection need not include an ID.",[491,538,539,540,310,543,310,546,310,549,314,552,555,556,559],{},"Manual ignition can additionally return ",[26,541,542],{},"not_on_duty",[26,544,545],{},"required_jobs",[26,547,548],{},"missing_item",[26,550,551],{},"invalid_player",[26,553,554],{},"cooldown","; a cooldown response includes ",[26,557,558],{},"remaining"," seconds.",[561,562,567],"pre",{"className":563,"code":564,"language":565,"meta":566,"style":566},"language-lua shiki shiki-themes material-theme-lighter material-theme material-theme-palenight","-- server.lua; replace 123 with the existing vehicle's real network ID.\nlocal vehicle_net_id = 123\nlocal result = exports[\"sky_firejob\"]:CreateVehicleFire({\n    netId = vehicle_net_id,\n    source = \"my_incident_resource\",\n    initialStage = \"smoke\"\n}, 0)\n\nif not result.success then\n    print((\"Could not create vehicle fire: %s\"):format(result.error))\n    return\nend\n\nprint((\"Created fire %s on vehicle %s\"):format(result.fireId, vehicle_net_id))\n-- Keep vehicle_net_id in your incident state for RemoveVehicleFire.\n","lua","",[26,568,569,578,596,626,637,656,671,682,689,709,740,746,752,757,783],{"__ignoreMap":566},[570,571,574],"span",{"class":572,"line":573},"line",1,[570,575,577],{"class":576},"sHwdD","-- server.lua; replace 123 with the existing vehicle's real network ID.\n",[570,579,581,585,589,592],{"class":572,"line":580},2,[570,582,584],{"class":583},"sMK4o","local",[570,586,588],{"class":587},"sTEyZ"," vehicle_net_id ",[570,590,591],{"class":583},"=",[570,593,595],{"class":594},"sbssI"," 123\n",[570,597,599,601,604,606,609,612,615,617,620,623],{"class":572,"line":598},3,[570,600,584],{"class":583},[570,602,603],{"class":587}," result ",[570,605,591],{"class":583},[570,607,608],{"class":587}," exports[",[570,610,611],{"class":583},"\"",[570,613,28],{"class":614},"sfazB",[570,616,611],{"class":583},[570,618,619],{"class":587},"]:",[570,621,81],{"class":622},"s2Zo4",[570,624,625],{"class":587},"({\n",[570,627,629,632,634],{"class":572,"line":628},4,[570,630,631],{"class":587},"    netId ",[570,633,591],{"class":583},[570,635,636],{"class":587}," vehicle_net_id,\n",[570,638,640,643,645,648,651,653],{"class":572,"line":639},5,[570,641,642],{"class":587},"    source ",[570,644,591],{"class":583},[570,646,647],{"class":583}," \"",[570,649,650],{"class":614},"my_incident_resource",[570,652,611],{"class":583},[570,654,655],{"class":587},",\n",[570,657,659,662,664,666,668],{"class":572,"line":658},6,[570,660,661],{"class":587},"    initialStage ",[570,663,591],{"class":583},[570,665,647],{"class":583},[570,667,399],{"class":614},[570,669,670],{"class":583},"\"\n",[570,672,674,677,679],{"class":572,"line":673},7,[570,675,676],{"class":587},"}, ",[570,678,158],{"class":594},[570,680,681],{"class":587},")\n",[570,683,685],{"class":572,"line":684},8,[570,686,688],{"emptyLinePlaceholder":687},true,"\n",[570,690,692,696,699,702,706],{"class":572,"line":691},9,[570,693,695],{"class":694},"s7zQu","if",[570,697,698],{"class":583}," not",[570,700,701],{"class":587}," result.",[570,703,705],{"class":704},"sBMFI","success",[570,707,708],{"class":694}," then\n",[570,710,712,715,718,720,723,725,728,731,734,737],{"class":572,"line":711},10,[570,713,714],{"class":622},"    print",[570,716,717],{"class":587},"((",[570,719,611],{"class":583},[570,721,722],{"class":614},"Could not create vehicle fire: %s",[570,724,611],{"class":583},[570,726,727],{"class":587},"):",[570,729,730],{"class":622},"format",[570,732,733],{"class":587},"(result.",[570,735,736],{"class":704},"error",[570,738,739],{"class":587},"))\n",[570,741,743],{"class":572,"line":742},11,[570,744,745],{"class":694},"    return\n",[570,747,749],{"class":572,"line":748},12,[570,750,751],{"class":694},"end\n",[570,753,755],{"class":572,"line":754},13,[570,756,688],{"emptyLinePlaceholder":687},[570,758,760,763,765,767,770,772,774,776,778,780],{"class":572,"line":759},14,[570,761,762],{"class":622},"print",[570,764,717],{"class":587},[570,766,611],{"class":583},[570,768,769],{"class":614},"Created fire %s on vehicle %s",[570,771,611],{"class":583},[570,773,727],{"class":587},[570,775,730],{"class":622},[570,777,733],{"class":587},[570,779,535],{"class":704},[570,781,782],{"class":587},", vehicle_net_id))\n",[570,784,786],{"class":572,"line":785},15,[570,787,788],{"class":576},"-- Keep vehicle_net_id in your incident state for RemoveVehicleFire.\n",[10,790,791,792,497],{},"Creation accepts coordinates without a resolvable vehicle, but such a fire is not necessarily tied to an existing vehicle. Supply a valid vehicle network ID when you need vehicle attachment and later removal with ",[26,793,96],{},[795,796,797],"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 .sbssI, html code.shiki .sbssI{--shiki-light:#F76D47;--shiki-default:#F78C6C;--shiki-dark:#F78C6C}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":566,"searchDepth":573,"depth":580,"links":799},[800],{"id":163,"depth":580,"text":164,"children":801},[802],{"id":168,"depth":598,"text":171},"Reference for Server: CreateVehicleFire(payload, creator, options) in firejob.","md",null,{},"/docs/jobs/firejob/reference/exports/server-createvehiclefire",{"title":5,"description":803},{"loc":807},"1.docs/0.jobs/3.firejob/4.reference/3.exports/2.server-createvehiclefire","WN___ZGb17F8gZYIkDkVIYFqp5WDEWyRd2mZjP6llds",[813,818],{"title":814,"path":815,"stem":816,"description":817,"children":-1},"Server: CreateFire(payload, creator)","/docs/jobs/firejob/reference/exports/server-createfire","1.docs/0.jobs/3.firejob/4.reference/3.exports/1.server-createfire","Reference for Server: CreateFire(payload, creator) in firejob.",{"title":819,"path":820,"stem":821,"description":822,"children":-1},"Server: RemoveVehicleFire(netId, reason)","/docs/jobs/firejob/reference/exports/server-removevehiclefire","1.docs/0.jobs/3.firejob/4.reference/3.exports/3.server-removevehiclefire","Reference for Server: RemoveVehicleFire(netId, reason) in firejob.",[],1791814228851]