[{"data":1,"prerenderedAt":237,"buildId":238},["ShallowReactive",2],{"page-\u002Fwiki\u002Fdispatch-integration":3,"related-\u002Fwiki\u002Fdispatch-integration":218},{"id":4,"title":5,"body":6,"category":209,"description":210,"extension":211,"meta":212,"navigation":68,"path":213,"script":214,"seo":215,"stem":216,"__hash__":217},"wiki_en\u002Fwiki\u002F35.dispatch-integration.md","Switch emergency lights from another script",{"type":7,"value":8,"toc":204},"minimark",[9,14,152,160,164,184,188,191,200],[10,11,13],"h2",{"id":12},"turn-a-vehicle-on-for-a-call","Turn a vehicle on for a call",[15,16,22],"pre",{"className":17,"code":18,"filename":19,"language":20,"meta":21,"style":21},"language-lua shiki shiki-themes github-dark","local function startEmergencyRun(netId)\n    local vehicle = NetworkGetEntityFromNetworkId(netId)\n\n    if vehicle == 0 then\n        return\n    end\n\n    exports.lumina_els:setVehicleState(vehicle, { lights = true, siren = true, tone = 'wail' })\nend\n","server.lua","lua","",[23,24,25,45,63,70,87,93,99,104,146],"code",{"__ignoreMap":21},[26,27,30,34,37,41],"span",{"class":28,"line":29},"line",1,[26,31,33],{"class":32},"snl16","local",[26,35,36],{"class":32}," function",[26,38,40],{"class":39},"svObZ"," startEmergencyRun",[26,42,44],{"class":43},"s95oV","(netId)\n",[26,46,48,51,54,57,61],{"class":28,"line":47},2,[26,49,50],{"class":32},"    local",[26,52,53],{"class":43}," vehicle ",[26,55,56],{"class":32},"=",[26,58,60],{"class":59},"sDLfK"," NetworkGetEntityFromNetworkId",[26,62,44],{"class":43},[26,64,66],{"class":28,"line":65},3,[26,67,69],{"emptyLinePlaceholder":68},true,"\n",[26,71,73,76,78,81,84],{"class":28,"line":72},4,[26,74,75],{"class":32},"    if",[26,77,53],{"class":43},[26,79,80],{"class":32},"==",[26,82,83],{"class":59}," 0",[26,85,86],{"class":32}," then\n",[26,88,90],{"class":28,"line":89},5,[26,91,92],{"class":32},"        return\n",[26,94,96],{"class":28,"line":95},6,[26,97,98],{"class":32},"    end\n",[26,100,102],{"class":28,"line":101},7,[26,103,69],{"emptyLinePlaceholder":68},[26,105,107,110,113,116,119,122,124,127,130,132,134,137,139,143],{"class":28,"line":106},8,[26,108,109],{"class":43},"    exports.",[26,111,112],{"class":39},"lumina_els",[26,114,115],{"class":43},":",[26,117,118],{"class":59},"setVehicleState",[26,120,121],{"class":43},"(vehicle, { lights ",[26,123,56],{"class":32},[26,125,126],{"class":59}," true",[26,128,129],{"class":43},", siren ",[26,131,56],{"class":32},[26,133,126],{"class":59},[26,135,136],{"class":43},", tone ",[26,138,56],{"class":32},[26,140,142],{"class":141},"sU2Wk"," 'wail' ",[26,144,145],{"class":43},"})\n",[26,147,149],{"class":28,"line":148},9,[26,150,151],{"class":32},"end\n",[153,154,155,156,159],"p",{},"The vehicle needs an ELS profile and ",[23,157,158],{},"tone"," must exist in that profile. Otherwise the call raises an error.",[10,161,163],{"id":162},"turn-off-when-parking","Turn off when parking",[15,165,167],{"className":17,"code":166,"filename":19,"language":20,"meta":21,"style":21},"exports.lumina_els:resetVehicle(vehicle)\n",[23,168,169],{"__ignoreMap":21},[26,170,171,174,176,178,181],{"class":28,"line":29},[26,172,173],{"class":43},"exports.",[26,175,112],{"class":39},[26,177,115],{"class":43},[26,179,180],{"class":59},"resetVehicle",[26,182,183],{"class":43},"(vehicle)\n",[10,185,187],{"id":186},"security","Security",[153,189,190],{},"Do not call these exports from a client event without checks. Verify in your own script that the player is allowed to and really uses the vehicle.",[153,192,193,194,199],{},"All exports are listed under ",[195,196,198],"a",{"href":197},"\u002Fdocs\u002Flumina-els\u002Fapi","API",".",[201,202,203],"style",{},"html pre.shiki code .snl16, html code.shiki .snl16{--shiki-default:#F97583}html pre.shiki code .svObZ, html code.shiki .svObZ{--shiki-default:#B392F0}html pre.shiki code .s95oV, html code.shiki .s95oV{--shiki-default:#E1E4E8}html pre.shiki code .sDLfK, html code.shiki .sDLfK{--shiki-default:#79B8FF}html pre.shiki code .sU2Wk, html code.shiki .sU2Wk{--shiki-default:#9ECBFF}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);}",{"title":21,"searchDepth":47,"depth":47,"links":205},[206,207,208],{"id":12,"depth":47,"text":13},{"id":162,"depth":47,"text":163},{"id":186,"depth":47,"text":187},"examples","Example for dispatch or garage using the server exports.","md",{},"\u002Fwiki\u002Fdispatch-integration","ELS",{"title":5,"description":210},"wiki\u002F35.dispatch-integration","rOIHvIeCW3pbm6mKB2Az9gUDy44VM6Usb6mL7VzLrdY",[219,222,225,228,231,234],{"path":220,"title":221},"\u002Fwiki\u002Fox-inventory-items","Create the items in ox_inventory",{"path":223,"title":224},"\u002Fwiki\u002Fcustom-siren-profile","Create your own siren profile",{"path":226,"title":227},"\u002Fwiki\u002Fsiren-pack","Add your own siren pack",{"path":229,"title":230},"\u002Fwiki\u002Fbeacon-position","Position the deployable light per vehicle model",{"path":232,"title":233},"\u002Fwiki\u002Frestrict-jobs","ELS for certain jobs only",{"path":235,"title":236},"\u002Fwiki\u002Fcustom-notifications","Your own notification system in the core",1796489274780,"796809a0-6a93-472e-ad3e-7b1dd1b64509"]