[{"data":1,"prerenderedAt":709},["ShallowReactive",2],{"/docs/jobs/ambulancejob/api/server-exports/player-state-and-revive":3,"/docs/jobs/ambulancejob/api/server-exports/player-state-and-revive-surround":697,"/docs/jobs/ambulancejob/api/server-exports/player-state-and-revive-implemented-suggestions":708},{"id":4,"title":5,"body":6,"description":688,"extension":689,"head":690,"implementedSuggestions":690,"meta":691,"navigation":96,"path":692,"schemaOrg":690,"seo":693,"sitemap":694,"stem":695,"__hash__":696},"docs/1.docs/0.jobs/0.ambulancejob/5.api/1.server-exports/2.player-state-and-revive.md","Player State and Revive",{"type":7,"value":8,"toc":678},"minimark",[9,17,22,30,33,130,183,197,213,219,310,379,385,430,490,496,528,550,556,587,616,624,630,644,674],[10,11,12],"p",{},[13,14,16],"a",{"href":15},"/docs/jobs/ambulancejob/api/server-exports","All server exports",[18,19,21],"h2",{"id":20},"exports","Exports",[23,24,26],"h3",{"id":25},"killplayerplayerid-customreason",[27,28,29],"code",{},"killPlayer(playerId, customReason?)",[10,31,32],{},"Sends a kill request to the specified player's ambulance death flow. Use an optional custom reason for integrations such as overdose systems.",[34,35,41],"pre",{"className":36,"code":37,"filename":38,"language":39,"meta":40,"style":40},"language-lua shiki shiki-themes material-theme-lighter material-theme material-theme-palenight","local sent = exports[\"sky_ambulancejob\"]:killPlayer(playerId, \"Overdose\")\n\n-- Keep the default forced-death reason:\nlocal sentDefault = exports[\"sky_ambulancejob\"]:killPlayer(playerId)\n","server.lua","lua","",[27,42,43,91,98,105],{"__ignoreMap":40},[44,45,48,52,56,59,62,65,69,71,74,78,81,83,86,88],"span",{"class":46,"line":47},"line",1,[44,49,51],{"class":50},"sMK4o","local",[44,53,55],{"class":54},"sTEyZ"," sent ",[44,57,58],{"class":50},"=",[44,60,61],{"class":54}," exports[",[44,63,64],{"class":50},"\"",[44,66,68],{"class":67},"sfazB","sky_ambulancejob",[44,70,64],{"class":50},[44,72,73],{"class":54},"]:",[44,75,77],{"class":76},"s2Zo4","killPlayer",[44,79,80],{"class":54},"(playerId, ",[44,82,64],{"class":50},[44,84,85],{"class":67},"Overdose",[44,87,64],{"class":50},[44,89,90],{"class":54},")\n",[44,92,94],{"class":46,"line":93},2,[44,95,97],{"emptyLinePlaceholder":96},true,"\n",[44,99,101],{"class":46,"line":100},3,[44,102,104],{"class":103},"sHwdD","-- Keep the default forced-death reason:\n",[44,106,108,110,113,115,117,119,121,123,125,127],{"class":46,"line":107},4,[44,109,51],{"class":50},[44,111,112],{"class":54}," sentDefault ",[44,114,58],{"class":50},[44,116,61],{"class":54},[44,118,64],{"class":50},[44,120,68],{"class":67},[44,122,64],{"class":50},[44,124,73],{"class":54},[44,126,77],{"class":76},[44,128,129],{"class":54},"(playerId)\n",[131,132,133,149],"table",{},[134,135,136],"thead",{},[137,138,139,143,146],"tr",{},[140,141,142],"th",{},"Argument",[140,144,145],{},"Type",[140,147,148],{},"Description",[150,151,152,168],"tbody",{},[137,153,154,160,165],{},[155,156,157],"td",{},[27,158,159],{},"playerId",[155,161,162],{},[27,163,164],{},"number | string",[155,166,167],{},"Positive integer server ID of an online player, or its numeric string. Local player indexes, ped handles and broadcast targets are not supported.",[137,169,170,175,180],{},[155,171,172],{},[27,173,174],{},"customReason",[155,176,177],{},[27,178,179],{},"string?",[155,181,182],{},"Optional localized plain text from your integration. Leading/trailing spaces are trimmed. Must contain 1–120 Unicode characters, valid UTF-8 and no ASCII control characters.",[10,184,185,186,189,190,193,194,196],{},"Returns ",[27,187,188],{},"true"," when the targeted client event is sent; ",[27,191,192],{},"false"," for an invalid/offline player or invalid reason. ",[27,195,188],{}," does not confirm that the player died: the client's spawn-readiness, damage protection and death hooks still apply. Call this from a trusted server resource instead of killing the ped separately first.",[10,198,199,200,203,204,207,208,212],{},"The custom text appears in the paramedic diagnosis view while the patient is unconscious and on the death screen when cause information is enabled. It clears on revival. Omitting the reason or passing ",[27,201,202],{},"nil"," preserves the existing ",[27,205,206],{},"suicide"," reason. Custom text does not change injuries or treatment rules. See ",[13,209,211],{"href":210},"/docs/jobs/ambulancejob/api/client-exports#killplayercustomreason","Client Exports"," for the local-player version.",[23,214,216],{"id":215},"reviveplayerid-context",[27,217,218],{},"revive(playerId, context?)",[220,221,222,230,295],"ul",{},[223,224,225,229],"li",{},[226,227,228],"strong",{},"Purpose",": Revives the supplied player.",[223,231,232,235,236],{},[226,233,234],{},"Arguments",":\n",[220,237,238,247],{},[223,239,240,242,243,246],{},[27,241,159],{}," (",[27,244,245],{},"number|string","): The server ID of the player that should be revived.",[223,248,249,242,252,255,256],{},[27,250,251],{},"context",[27,253,254],{},"table?","): Optional revive context.\n",[220,257,258],{},[223,259,260,242,263,265,266],{},[27,261,262],{},"reason",[27,264,179],{},"): Controls post-revive behaviour.\n",[220,267,268,274,283,290],{},[223,269,270,273],{},[27,271,272],{},"\"command\""," — Admin/force revive. Skips the death timeout (combat lockout).",[223,275,276,279,280,282],{},[27,277,278],{},"\"txadmin_heal\""," — Same as ",[27,281,272],{},".",[223,284,285,279,288,282],{},[27,286,287],{},"\"heal_command\"",[27,289,272],{},[223,291,292,294],{},[27,293,202],{}," / omitted — Normal revive. Death timeout applies as configured.",[223,296,297,300,301,242,304,306,307,309],{},[226,298,299],{},"Returns",": ",[27,302,303],{},"boolean",[27,305,188],{}," when the revive was triggered, ",[27,308,192],{}," for an invalid or offline target).",[34,311,313],{"className":36,"code":312,"language":39,"meta":40,"style":40},"-- Normal revive\nexports[\"sky_ambulancejob\"]:revive(playerId)\n\n-- Admin revive (skips death timeout)\nexports[\"sky_ambulancejob\"]:revive(playerId, { reason = \"command\" })\n",[27,314,315,320,338,342,347],{"__ignoreMap":40},[44,316,317],{"class":46,"line":47},[44,318,319],{"class":103},"-- Normal revive\n",[44,321,322,325,327,329,331,333,336],{"class":46,"line":93},[44,323,324],{"class":54},"exports[",[44,326,64],{"class":50},[44,328,68],{"class":67},[44,330,64],{"class":50},[44,332,73],{"class":54},[44,334,335],{"class":76},"revive",[44,337,129],{"class":54},[44,339,340],{"class":46,"line":100},[44,341,97],{"emptyLinePlaceholder":96},[44,343,344],{"class":46,"line":107},[44,345,346],{"class":103},"-- Admin revive (skips death timeout)\n",[44,348,350,352,354,356,358,360,362,365,367,370,373,376],{"class":46,"line":349},5,[44,351,324],{"class":54},[44,353,64],{"class":50},[44,355,68],{"class":67},[44,357,64],{"class":50},[44,359,73],{"class":54},[44,361,335],{"class":76},[44,363,364],{"class":54},"(playerId, { reason ",[44,366,58],{"class":50},[44,368,369],{"class":50}," \"",[44,371,372],{"class":67},"command",[44,374,375],{"class":50},"\" ",[44,377,378],{"class":54},"})\n",[23,380,382],{"id":381},"setgodmodeplayerid-enabled",[27,383,384],{},"setGodmode(playerId, enabled)",[220,386,387,392,419],{},[223,388,389,391],{},[226,390,228],{},": Enables or disables damage protection for the supplied player through a server-authoritative export.",[223,393,394,235,396],{},[226,395,234],{},[220,397,398,405],{},[223,399,400,242,402,404],{},[27,401,159],{},[27,403,245],{},"): The server ID of the player.",[223,406,407,242,410,412,413,415,416,418],{},[27,408,409],{},"enabled",[27,411,303],{},"): ",[27,414,188],{}," enables Godmode; ",[27,417,192],{}," disables it.",[223,420,421,300,423,242,425,427,428,309],{},[226,422,299],{},[27,424,303],{},[27,426,188],{}," when the state was applied, ",[27,429,192],{},[34,431,433],{"className":36,"code":432,"language":39,"meta":40,"style":40},"-- Enable Godmode\nexports[\"sky_ambulancejob\"]:setGodmode(playerId, true)\n\n-- Disable Godmode\nexports[\"sky_ambulancejob\"]:setGodmode(playerId, false)\n",[27,434,435,440,461,465,470],{"__ignoreMap":40},[44,436,437],{"class":46,"line":47},[44,438,439],{"class":103},"-- Enable Godmode\n",[44,441,442,444,446,448,450,452,455,457,459],{"class":46,"line":93},[44,443,324],{"class":54},[44,445,64],{"class":50},[44,447,68],{"class":67},[44,449,64],{"class":50},[44,451,73],{"class":54},[44,453,454],{"class":76},"setGodmode",[44,456,80],{"class":54},[44,458,188],{"class":50},[44,460,90],{"class":54},[44,462,463],{"class":46,"line":100},[44,464,97],{"emptyLinePlaceholder":96},[44,466,467],{"class":46,"line":107},[44,468,469],{"class":103},"-- Disable Godmode\n",[44,471,472,474,476,478,480,482,484,486,488],{"class":46,"line":349},[44,473,324],{"class":54},[44,475,64],{"class":50},[44,477,68],{"class":67},[44,479,64],{"class":50},[44,481,73],{"class":54},[44,483,454],{"class":76},[44,485,80],{"class":54},[44,487,192],{"class":50},[44,489,90],{"class":54},[23,491,493],{"id":492},"isdeadplayerid",[27,494,495],{},"isDead(playerId)",[220,497,498,503,516],{},[223,499,500,502],{},[226,501,228],{},": Reports whether the specified player is currently flagged as dead by the ambulance job logic.",[223,504,505,235,507],{},[226,506,234],{},[220,508,509],{},[223,510,511,242,513,515],{},[27,512,159],{},[27,514,245],{},"): The server ID of the player whose state should be checked.",[223,517,518,300,520,242,522,524,525,527],{},[226,519,299],{},[27,521,303],{},[27,523,188],{}," when the player is dead or downed, ",[27,526,192],{}," otherwise).",[34,529,531],{"className":36,"code":530,"language":39,"meta":40,"style":40},"exports[\"sky_ambulancejob\"]:isDead(playerId)\n",[27,532,533],{"__ignoreMap":40},[44,534,535,537,539,541,543,545,548],{"class":46,"line":47},[44,536,324],{"class":54},[44,538,64],{"class":50},[44,540,68],{"class":67},[44,542,64],{"class":50},[44,544,73],{"class":54},[44,546,547],{"class":76},"isDead",[44,549,129],{"class":54},[23,551,553],{"id":552},"getdeathstateplayerid",[27,554,555],{},"getDeathState(playerId)",[220,557,558,563,576],{},[223,559,560,562],{},[226,561,228],{},": Returns the server-authoritative death snapshot for the specified player, including phase, bleed-out timer, action availability, AI Medic state, and detected cause.",[223,564,565,235,567],{},[226,566,234],{},[220,568,569],{},[223,570,571,242,573,575],{},[27,572,159],{},[27,574,245],{},"): The server ID of the player whose state should be read.",[223,577,578,300,580,583,584,586],{},[226,579,299],{},[27,581,582],{},"table|nil"," — the death snapshot, or ",[27,585,202],{}," for an invalid or offline player.",[34,588,590],{"className":36,"code":589,"language":39,"meta":40,"style":40},"local state = exports[\"sky_ambulancejob\"]:getDeathState(playerId)\n",[27,591,592],{"__ignoreMap":40},[44,593,594,596,599,601,603,605,607,609,611,614],{"class":46,"line":47},[44,595,51],{"class":50},[44,597,598],{"class":54}," state ",[44,600,58],{"class":50},[44,602,61],{"class":54},[44,604,64],{"class":50},[44,606,68],{"class":67},[44,608,64],{"class":50},[44,610,73],{"class":54},[44,612,613],{"class":76},"getDeathState",[44,615,129],{"class":54},[10,617,618,619,623],{},"See ",[13,620,622],{"href":621},"/docs/jobs/ambulancejob/api/external-death-screen","External Death Screen"," for the complete\nintegration flow, state fields, client actions, and security requirements.",[23,625,627],{"id":626},"getstretchermodels",[27,628,629],{},"getStretcherModels()",[220,631,632,637],{},[223,633,634,636],{},[226,635,228],{},": Returns the list of vehicle models configured as stretcher vehicles.",[223,638,639,300,641,643],{},[226,640,299],{},[27,642,131],{}," — array of model hashes used for stretcher transport.",[34,645,647],{"className":36,"code":646,"language":39,"meta":40,"style":40},"local models = exports[\"sky_ambulancejob\"]:getStretcherModels()\n",[27,648,649],{"__ignoreMap":40},[44,650,651,653,656,658,660,662,664,666,668,671],{"class":46,"line":47},[44,652,51],{"class":50},[44,654,655],{"class":54}," models ",[44,657,58],{"class":50},[44,659,61],{"class":54},[44,661,64],{"class":50},[44,663,68],{"class":67},[44,665,64],{"class":50},[44,667,73],{"class":54},[44,669,670],{"class":76},"getStretcherModels",[44,672,673],{"class":54},"()\n",[675,676,677],"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 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 .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":40,"searchDepth":47,"depth":93,"links":679},[680],{"id":20,"depth":93,"text":21,"children":681},[682,683,684,685,686,687],{"id":25,"depth":100,"text":29},{"id":215,"depth":100,"text":218},{"id":381,"depth":100,"text":384},{"id":492,"depth":100,"text":495},{"id":552,"depth":100,"text":555},{"id":626,"depth":100,"text":629},"Death, revive, god-mode and player-state server exports.","md",null,{},"/docs/jobs/ambulancejob/api/server-exports/player-state-and-revive",{"title":5,"description":688},{"loc":692},"1.docs/0.jobs/0.ambulancejob/5.api/1.server-exports/2.player-state-and-revive","FYODmRFo9NNsKCTC11ZMFhZ3GzOpmOKjRtCNCasgsXc",[698,703],{"title":699,"path":700,"stem":701,"description":702,"children":-1},"Dispatch","/docs/jobs/ambulancejob/api/server-exports/dispatch","1.docs/0.jobs/0.ambulancejob/5.api/1.server-exports/1.dispatch","Reference for Dispatch in ambulancejob.",{"title":704,"path":705,"stem":706,"description":707,"children":-1},"Insurance","/docs/jobs/ambulancejob/api/server-exports/insurance","1.docs/0.jobs/0.ambulancejob/5.api/1.server-exports/3.insurance","Reference for Insurance in ambulancejob.",[],1791814177413]