[{"data":1,"prerenderedAt":558},["ShallowReactive",2],{"/docs/jobs/ambulancejob/api/client-exports/death-screen":3,"/docs/jobs/ambulancejob/api/client-exports/death-screen-surround":546,"/docs/jobs/ambulancejob/api/client-exports/death-screen-implemented-suggestions":557},{"id":4,"title":5,"body":6,"description":536,"extension":537,"head":538,"implementedSuggestions":538,"meta":539,"navigation":540,"path":541,"schemaOrg":538,"seo":542,"sitemap":543,"stem":544,"__hash__":545},"docs/1.docs/0.jobs/0.ambulancejob/5.api/3.client-exports/5.death-screen.md","Death Screen",{"type":7,"value":8,"toc":524},"minimark",[9,17,21,29,32,90,128,147,162,183,196,202,221,251,257,328,365,371,382,404,410,434,462,468,490,517,520],[10,11,12],"p",{},[13,14,16],"a",{"href":15},"/docs/jobs/ambulancejob/api/client-exports","All client exports",[18,19,5],"h2",{"id":20},"death-screen",[22,23,25],"h3",{"id":24},"killplayercustomreason",[26,27,28],"code",{},"killPlayer(customReason?)",[10,30,31],{},"Kills the local player through the normal ambulance death flow. Use the optional reason for integrations such as overdose systems; the text appears on the death screen and in the paramedic diagnosis UI.",[33,34,40],"pre",{"className":35,"code":36,"filename":37,"language":38,"meta":39,"style":39},"language-lua shiki shiki-themes material-theme-lighter material-theme material-theme-palenight","local accepted = exports[\"sky_ambulancejob\"]:killPlayer(\"Overdose\")\n","client.lua","lua","",[26,41,42],{"__ignoreMap":39},[43,44,47,51,55,58,61,64,68,70,73,77,80,82,85,87],"span",{"class":45,"line":46},"line",1,[43,48,50],{"class":49},"sMK4o","local",[43,52,54],{"class":53},"sTEyZ"," accepted ",[43,56,57],{"class":49},"=",[43,59,60],{"class":53}," exports[",[43,62,63],{"class":49},"\"",[43,65,67],{"class":66},"sfazB","sky_ambulancejob",[43,69,63],{"class":49},[43,71,72],{"class":53},"]:",[43,74,76],{"class":75},"s2Zo4","killPlayer",[43,78,79],{"class":53},"(",[43,81,63],{"class":49},[43,83,84],{"class":66},"Overdose",[43,86,63],{"class":49},[43,88,89],{"class":53},")\n",[91,92,93,109],"table",{},[94,95,96],"thead",{},[97,98,99,103,106],"tr",{},[100,101,102],"th",{},"Argument",[100,104,105],{},"Type",[100,107,108],{},"Description",[110,111,112],"tbody",{},[97,113,114,120,125],{},[115,116,117],"td",{},[26,118,119],{},"customReason",[115,121,122],{},[26,123,124],{},"string?",[115,126,127],{},"Optional display text. Leading and trailing whitespace is trimmed. The result must contain 1–120 Unicode characters, valid UTF-8, and no ASCII control characters. Supply the translated text from your integration's locale.",[10,129,130,131,134,135,138,139,142,143,146],{},"Returns ",[26,132,133],{},"true"," when the death flow starts and ",[26,136,137],{},"false"," when the request is rejected, including invalid text, an already dead player, or a blocked death. Invalid text does not kill the player. Omit the argument or pass ",[26,140,141],{},"nil"," to retain the existing ",[26,144,145],{},"suicide"," behavior. Custom text changes the displayed reason; the existing forced-death injury rules still apply.",[10,148,149,150,153,154,157,158,161],{},"The reason is stored as ",[26,151,152],{},"profile.death.customReason"," and exposed as ",[26,155,156],{},"getDeathState().cause.customReason",". The bundled death-screen NUI receives it as ",[26,159,160],{},"customDeathReason",".",[10,163,164,165,171,172,179,180,161],{},"For a server integration, use ",[13,166,168],{"href":167},"/docs/jobs/ambulancejob/api/server-exports#killplayerplayerid-customreason",[26,169,170],{},"killPlayer(playerId, customReason?)",", or send the ",[13,173,175,178],{"href":174},"/docs/jobs/ambulancejob/api/client-events#sky_ambulancejobkillplayer",[26,176,177],{},"sky_ambulancejob:killPlayer"," client event"," with ",[26,181,182],{},"TriggerClientEvent",[184,185,188],"callout",{"color":186,"icon":187},"info","i-lucide-panels-top-left",[10,189,190,191,195],{},"Building a replacement UI? See ",[13,192,194],{"href":193},"/docs/jobs/ambulancejob/api/external-death-screen","External Death Screen","\nfor the complete setup, state contract, actions, error codes, and server API.",[22,197,199],{"id":198},"getdeathstate",[26,200,201],{},"getDeathState()",[203,204,205,213],"ul",{},[206,207,208,212],"li",{},[209,210,211],"strong",{},"Purpose",": Returns a complete snapshot of the local player's death lifecycle, timer, action availability, AI Medic state, and detected cause.",[206,214,215,218,219],{},[209,216,217],{},"Returns",": ",[26,220,91],{},[33,222,224],{"className":35,"code":223,"language":38,"meta":39,"style":39},"local state = exports[\"sky_ambulancejob\"]:getDeathState()\n",[26,225,226],{"__ignoreMap":39},[43,227,228,230,233,235,237,239,241,243,245,248],{"class":45,"line":46},[43,229,50],{"class":49},[43,231,232],{"class":53}," state ",[43,234,57],{"class":49},[43,236,60],{"class":53},[43,238,63],{"class":49},[43,240,67],{"class":66},[43,242,63],{"class":49},[43,244,72],{"class":53},[43,246,247],{"class":75},"getDeathState",[43,249,250],{"class":53},"()\n",[22,252,254],{"id":253},"requestdeathactionaction-payload",[26,255,256],{},"requestDeathAction(action, payload?)",[203,258,259,264,305],{},[206,260,261,263],{},[209,262,211],{},": Requests a server-validated dispatch, early respawn, AI Medic, or AI Medic offer response.",[206,265,266,269,270],{},[209,267,268],{},"Arguments",":\n",[203,271,272,296],{},[206,273,274,277,278,281,282,285,286,285,289,292,293,161],{},[26,275,276],{},"action"," (",[26,279,280],{},"string","): ",[26,283,284],{},"request_dispatch",", ",[26,287,288],{},"request_early_respawn",[26,290,291],{},"request_ai_medic",", or ",[26,294,295],{},"respond_ai_medic_offer",[206,297,298,277,301,304],{},[26,299,300],{},"payload",[26,302,303],{},"table?","): Optional action payload.",[206,306,307,269,309],{},[209,308,217],{},[203,310,311,317],{},[206,312,313,316],{},[26,314,315],{},"boolean",": Whether the request was accepted.",[206,318,319,321,322,324,325,161],{},[26,320,91],{},": Success data or a failure object containing ",[26,323,26],{}," and ",[26,326,327],{},"message",[33,329,331],{"className":35,"code":330,"language":38,"meta":39,"style":39},"local success, result = exports[\"sky_ambulancejob\"]:requestDeathAction(\"request_dispatch\")\n",[26,332,333],{"__ignoreMap":39},[43,334,335,337,340,342,344,346,348,350,352,355,357,359,361,363],{"class":45,"line":46},[43,336,50],{"class":49},[43,338,339],{"class":53}," success, result ",[43,341,57],{"class":49},[43,343,60],{"class":53},[43,345,63],{"class":49},[43,347,67],{"class":66},[43,349,63],{"class":49},[43,351,72],{"class":53},[43,353,354],{"class":75},"requestDeathAction",[43,356,79],{"class":53},[43,358,63],{"class":49},[43,360,284],{"class":66},[43,362,63],{"class":49},[43,364,89],{"class":53},[22,366,368],{"id":367},"open",[26,369,370],{},"open()",[203,372,373],{},[206,374,375,377,378,381],{},[209,376,211],{},": Opens the bundled death screen UI. Returns ",[26,379,380],{},"external_deathscreen_active"," when external mode is active.",[33,383,385],{"className":35,"code":384,"language":38,"meta":39,"style":39},"exports[\"sky_ambulancejob\"]:open()\n",[26,386,387],{"__ignoreMap":39},[43,388,389,392,394,396,398,400,402],{"class":45,"line":46},[43,390,391],{"class":53},"exports[",[43,393,63],{"class":49},[43,395,67],{"class":66},[43,397,63],{"class":49},[43,399,72],{"class":53},[43,401,367],{"class":75},[43,403,250],{"class":53},[22,405,407],{"id":406},"updatetimeseconds",[26,408,409],{},"updateTime(seconds)",[203,411,412,419],{},[206,413,414,416,417,381],{},[209,415,211],{},": Updates the bundled death-screen timer to a specific value. Returns ",[26,418,380],{},[206,420,421,269,423],{},[209,422,268],{},[203,424,425],{},[206,426,427,277,430,433],{},[26,428,429],{},"seconds",[26,431,432],{},"number","): The new timer value in seconds.",[33,435,437],{"className":35,"code":436,"language":38,"meta":39,"style":39},"exports[\"sky_ambulancejob\"]:updateTime(120)\n",[26,438,439],{"__ignoreMap":39},[43,440,441,443,445,447,449,451,454,456,460],{"class":45,"line":46},[43,442,391],{"class":53},[43,444,63],{"class":49},[43,446,67],{"class":66},[43,448,63],{"class":49},[43,450,72],{"class":53},[43,452,453],{"class":75},"updateTime",[43,455,79],{"class":53},[43,457,459],{"class":458},"sbssI","120",[43,461,89],{"class":53},[22,463,465],{"id":464},"addtimeseconds",[26,466,467],{},"addTime(seconds)",[203,469,470,477],{},[206,471,472,474,475,381],{},[209,473,211],{},": Adds time to the bundled death-screen timer. Returns ",[26,476,380],{},[206,478,479,269,481],{},[209,480,268],{},[203,482,483],{},[206,484,485,277,487,489],{},[26,486,429],{},[26,488,432],{},"): Seconds to add.",[33,491,493],{"className":35,"code":492,"language":38,"meta":39,"style":39},"exports[\"sky_ambulancejob\"]:addTime(30)\n",[26,494,495],{"__ignoreMap":39},[43,496,497,499,501,503,505,507,510,512,515],{"class":45,"line":46},[43,498,391],{"class":53},[43,500,63],{"class":49},[43,502,67],{"class":66},[43,504,63],{"class":49},[43,506,72],{"class":53},[43,508,509],{"class":75},"addTime",[43,511,79],{"class":53},[43,513,514],{"class":458},"30",[43,516,89],{"class":53},[518,519],"br",{},[521,522,523],"style",{},"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 .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);}html pre.shiki code .sbssI, html code.shiki .sbssI{--shiki-light:#F76D47;--shiki-default:#F78C6C;--shiki-dark:#F78C6C}",{"title":39,"searchDepth":46,"depth":525,"links":526},2,[527],{"id":20,"depth":525,"text":5,"children":528},[529,531,532,533,534,535],{"id":24,"depth":530,"text":28},3,{"id":198,"depth":530,"text":201},{"id":253,"depth":530,"text":256},{"id":367,"depth":530,"text":370},{"id":406,"depth":530,"text":409},{"id":464,"depth":530,"text":467},"Reference for Death Screen in ambulancejob.","md",null,{},true,"/docs/jobs/ambulancejob/api/client-exports/death-screen",{"title":5,"description":536},{"loc":541},"1.docs/0.jobs/0.ambulancejob/5.api/3.client-exports/5.death-screen","U57S1gzjLG9MtB8LKtflsE5Qptb_6WN29W6f_7kARYQ",[547,552],{"title":548,"path":549,"stem":550,"description":551,"children":-1},"Wheelchair","/docs/jobs/ambulancejob/api/client-exports/wheelchair","1.docs/0.jobs/0.ambulancejob/5.api/3.client-exports/4.wheelchair","Reference for Wheelchair in ambulancejob.",{"title":553,"path":554,"stem":555,"description":556,"children":-1},"AI Medic","/docs/jobs/ambulancejob/api/client-exports/ai-medic","1.docs/0.jobs/0.ambulancejob/5.api/3.client-exports/6.ai-medic","Reference for AI Medic in ambulancejob.",[],1791814178659]