[{"data":1,"prerenderedAt":621},["ShallowReactive",2],{"/docs/jobs/jobcreator/api/client-exports":3,"/docs/jobs/jobcreator/api/client-exports-surround":608,"/docs/jobs/jobcreator/api/client-exports-implemented-suggestions":620},{"id":4,"title":5,"body":6,"description":597,"extension":598,"head":599,"implementedSuggestions":599,"meta":600,"navigation":601,"path":603,"schemaOrg":599,"seo":604,"sitemap":605,"stem":606,"__hash__":607},"docs/1.docs/0.jobs/6.jobcreator/5.api/3.client-exports.md","Client exports",{"type":7,"value":8,"toc":588},"minimark",[9,23,28,31,70,73,95,104,108,130,133,141,145,167,175,179,182,280,283,374,384,388,396,399,428,431,435,478,507,511,584],[10,11,12,13,17,18,22],"p",{},"All calls on this page run in a ",[14,15,16],"strong",{},"client script"," and use ",[19,20,21],"code",{},"exports[\"sky_jobs_base\"]",". They act on the current player.",[24,25,27],"h2",{"id":26},"open-billing","Open billing",[10,29,30],{},"Open the player's personal billing interface from your own interaction:",[32,33,39],"pre",{"className":34,"code":35,"filename":36,"language":37,"meta":38,"style":38},"language-lua shiki shiki-themes material-theme-lighter material-theme material-theme-palenight","exports[\"sky_jobs_base\"]:OpenBilling()\n","client.lua","lua","",[19,40,41],{"__ignoreMap":38},[42,43,46,50,54,58,60,63,67],"span",{"class":44,"line":45},"line",1,[42,47,49],{"class":48},"sTEyZ","exports[",[42,51,53],{"class":52},"sMK4o","\"",[42,55,57],{"class":56},"sfazB","sky_jobs_base",[42,59,53],{"class":52},[42,61,62],{"class":48},"]:",[42,64,66],{"class":65},"s2Zo4","OpenBilling",[42,68,69],{"class":48},"()\n",[10,71,72],{},"Pass a positive numeric invoice ID to open a specific invoice:",[32,74,76],{"className":34,"code":75,"filename":36,"language":37,"meta":38,"style":38},"exports[\"sky_jobs_base\"]:OpenBilling(invoiceId)\n",[19,77,78],{"__ignoreMap":38},[42,79,80,82,84,86,88,90,92],{"class":44,"line":45},[42,81,49],{"class":48},[42,83,53],{"class":52},[42,85,57],{"class":56},[42,87,53],{"class":52},[42,89,62],{"class":48},[42,91,66],{"class":65},[42,93,94],{"class":48},"(invoiceId)\n",[10,96,97,98,103],{},"Billing must be enabled. Invoice access is checked for the current player. This export opens the interface; it has no success return value. See ",[99,100,102],"a",{"href":101},"/docs/base/jobs-base/server-exports/billing","Billing"," for server-side invoice creation and payment handling.",[24,105,107],{"id":106},"open-business-and-announcements","Open Business and announcements",[32,109,111],{"className":34,"code":110,"filename":36,"language":37,"meta":38,"style":38},"exports[\"sky_jobs_base\"]:OpenBusinessPanel()\n",[19,112,113],{"__ignoreMap":38},[42,114,115,117,119,121,123,125,128],{"class":44,"line":45},[42,116,49],{"class":48},[42,118,53],{"class":52},[42,120,57],{"class":56},[42,122,53],{"class":52},[42,124,62],{"class":48},[42,126,127],{"class":65},"OpenBusinessPanel",[42,129,69],{"class":48},[10,131,132],{},"This opens the authorised Business app in the tablet. Call it from a script thread or callback that allows yielding. The job's Business/Announcements settings, duty and employee permissions still apply. The export has no return-value contract.",[10,134,135,136,140],{},"See ",[99,137,139],{"href":138},"/docs/base/jobs-base/client-exports/business","Business Panel"," for details.",[24,142,144],{"id":143},"open-the-radial-menu","Open the radial menu",[32,146,148],{"className":34,"code":147,"filename":36,"language":37,"meta":38,"style":38},"exports[\"sky_jobs_base\"]:openRadialMenu()\n",[19,149,150],{"__ignoreMap":38},[42,151,152,154,156,158,160,162,165],{"class":44,"line":45},[42,153,49],{"class":48},[42,155,53],{"class":52},[42,157,57],{"class":56},[42,159,53],{"class":52},[42,161,62],{"class":48},[42,163,164],{"class":65},"openRadialMenu",[42,166,69],{"class":48},[10,168,169,170,174],{},"This opens the shared job radial menu with the current player's available actions. To add actions from your own resource, use the ",[99,171,173],{"href":172},"/docs/base/jobs-base/client-exports/radial-menu","Radial menu integration",", which also documents action queries, availability checks and triggering an action from another menu.",[24,176,178],{"id":177},"external-menus","External menus",[10,180,181],{},"Use these exports to show the existing job actions in your own radial or target menu:",[183,184,185,198],"table",{},[186,187,188],"thead",{},[189,190,191,195],"tr",{},[192,193,194],"th",{},"Export",[192,196,197],{},"Returns",[199,200,201,226,239,251,270],"tbody",{},[189,202,203,209],{},[204,205,206],"td",{},[19,207,208],{},"getRadialActions()",[204,210,211,212,215,216,215,219,222,223],{},"Action records including ",[19,213,214],{},"id",", ",[19,217,218],{},"label",[19,220,221],{},"icon"," and ",[19,224,225],{},"disabled",[189,227,228,233],{},[204,229,230],{},[19,231,232],{},"getRadialAction(actionId)",[204,234,235,236],{},"One action record, or ",[19,237,238],{},"nil",[189,240,241,246],{},[204,242,243],{},[19,244,245],{},"isRadialMenuActionAvailable(actionId)",[204,247,248],{},[19,249,250],{},"boolean",[189,252,253,258],{},[204,254,255],{},[19,256,257],{},"triggerRadialMenuAction(actionId, context?)",[204,259,260,263,264,222,267],{},[19,261,262],{},"success, error?","; errors contain ",[19,265,266],{},"key",[19,268,269],{},"fallback",[189,271,272,277],{},[204,273,274],{},[19,275,276],{},"registerRadialProvider(options)",[204,278,279],{},"Register your resource's actions; see the provider contract",[10,281,282],{},"For example, open the tablet from your own menu while keeping the shared availability checks:",[32,284,287],{"className":34,"code":285,"filename":286,"language":37,"meta":38,"style":38},"local success, error = exports[\"sky_jobs_base\"]:triggerRadialMenuAction(\"tablet\")\nif not success and error then\n    print(error.fallback)\nend\n","client.lua · inside your menu's selection callback",[19,288,289,327,349,368],{"__ignoreMap":38},[42,290,291,294,297,300,303,305,307,309,311,314,317,319,322,324],{"class":44,"line":45},[42,292,293],{"class":52},"local",[42,295,296],{"class":48}," success, error ",[42,298,299],{"class":52},"=",[42,301,302],{"class":48}," exports[",[42,304,53],{"class":52},[42,306,57],{"class":56},[42,308,53],{"class":52},[42,310,62],{"class":48},[42,312,313],{"class":65},"triggerRadialMenuAction",[42,315,316],{"class":48},"(",[42,318,53],{"class":52},[42,320,321],{"class":56},"tablet",[42,323,53],{"class":52},[42,325,326],{"class":48},")\n",[42,328,330,334,337,340,343,346],{"class":44,"line":329},2,[42,331,333],{"class":332},"s7zQu","if",[42,335,336],{"class":52}," not",[42,338,339],{"class":48}," success ",[42,341,342],{"class":52},"and",[42,344,345],{"class":65}," error",[42,347,348],{"class":332}," then\n",[42,350,352,355,357,360,363,366],{"class":44,"line":351},3,[42,353,354],{"class":65},"    print",[42,356,316],{"class":48},[42,358,359],{"class":65},"error",[42,361,362],{"class":48},".",[42,364,269],{"class":365},"sBMFI",[42,367,326],{"class":48},[42,369,371],{"class":44,"line":370},4,[42,372,373],{"class":332},"end\n",[10,375,376,377,379,380,383],{},"Use the IDs returned by ",[19,378,208],{}," for actions supplied by installed job resources. See ",[99,381,382],{"href":172},"Radial menu"," for provider registration, target context and complete examples.",[24,385,387],{"id":386},"player-actions","Player actions",[10,389,390,391,395],{},"The ",[99,392,394],{"href":393},"/docs/base/jobs-base/client-exports/player-interactions","Player interactions"," reference documents cuffing, zipties, leg restraints, escorting, vehicle actions, head bags and searching. It includes availability checks, target arguments and failure reasons.",[10,397,398],{},"For example, check restraint state without applying restraints:",[32,400,402],{"className":34,"code":401,"filename":36,"language":37,"meta":38,"style":38},"local cuffed = exports[\"sky_jobs_base\"]:isPlayerCuffed()\n",[19,403,404],{"__ignoreMap":38},[42,405,406,408,411,413,415,417,419,421,423,426],{"class":44,"line":45},[42,407,293],{"class":52},[42,409,410],{"class":48}," cuffed ",[42,412,299],{"class":52},[42,414,302],{"class":48},[42,416,53],{"class":52},[42,418,57],{"class":56},[42,420,53],{"class":52},[42,422,62],{"class":48},[42,424,425],{"class":65},"isPlayerCuffed",[42,427,69],{"class":48},[10,429,430],{},"Omit the server ID to check yourself; pass a target server ID to check that player. Executing an action still requires the job's server-authoritative interaction access, duty and configured items.",[24,432,434],{"id":433},"identity-licences-and-service-cards","Identity, licences and service cards",[183,436,437,446],{},[186,438,439],{},[189,440,441,443],{},[192,442,194],{},[192,444,445],{},"Use",[199,447,448,458,468],{},[189,449,450,455],{},[204,451,452],{},[19,453,454],{},"ShowOwnDocument(documentType)",[204,456,457],{},"View your own document",[189,459,460,465],{},[204,461,462],{},[19,463,464],{},"ShowPlayerDocument(documentType, targetServerId)",[204,466,467],{},"Inspect an authorised target's document",[189,469,470,475],{},[204,471,472],{},[19,473,474],{},"PresentOwnDocument(documentType, recipientServerId)",[204,476,477],{},"Offer your document to another player",[10,479,480,483,484,215,487,490,491,494,495,498,499,502,503,362],{},[19,481,482],{},"documentType"," is ",[19,485,486],{},"identity",[19,488,489],{},"licenses"," or ",[19,492,493],{},"service",". These calls return ",[19,496,497],{},"true"," when the request is accepted, or ",[19,500,501],{},"false, reason",". Distance, permissions, restraint state and the selected provider still apply. See ",[99,504,506],{"href":505},"/docs/base/jobs-base/client-exports/documents","Documents",[24,508,510],{"id":509},"more-integrations","More integrations",[183,512,513,523],{},[186,514,515],{},[189,516,517,520],{},[192,518,519],{},"Feature",[192,521,522],{},"Complete reference",[199,524,525,534,542,553,564,573],{},[189,526,527,530],{},[204,528,529],{},"Custom radial actions and external menus",[204,531,532],{},[99,533,382],{"href":172},[189,535,536,538],{},[204,537,394],{},[204,539,540],{},[99,541,394],{"href":393},[189,543,544,547],{},[204,545,546],{},"Storage access",[204,548,549],{},[99,550,552],{"href":551},"/docs/base/jobs-base/client-exports/storage","Storage",[189,554,555,558],{},[204,556,557],{},"External garage and vehicle access",[204,559,560],{},[99,561,563],{"href":562},"/docs/base/jobs-base/client-exports/external-garage-integration","External garage integration",[189,565,566,569],{},[204,567,568],{},"Documents and service cards",[204,570,571],{},[99,572,506],{"href":505},[189,574,575,578],{},[204,576,577],{},"Personal notification position",[204,579,580],{},[99,581,583],{"href":582},"/docs/base/jobs-base/client-exports/notification-settings","Notification settings",[585,586,587],"style",{},"html pre.shiki code .sTEyZ, html code.shiki .sTEyZ{--shiki-light:#90A4AE;--shiki-default:#EEFFFF;--shiki-dark:#BABED8}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 .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 .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}",{"title":38,"searchDepth":45,"depth":329,"links":589},[590,591,592,593,594,595,596],{"id":26,"depth":329,"text":27},{"id":106,"depth":329,"text":107},{"id":143,"depth":329,"text":144},{"id":177,"depth":329,"text":178},{"id":386,"depth":329,"text":387},{"id":433,"depth":329,"text":434},{"id":509,"depth":329,"text":510},"Open job menus and connect your own client interactions or radial menu.","md",null,{},{"icon":602},"i-lucide-monitor","/docs/jobs/jobcreator/api/client-exports",{"title":5,"description":597},{"loc":603},"1.docs/0.jobs/6.jobcreator/5.api/3.client-exports","v2HE7GbD7ut2q4DvxoIs-nz2cKERk7wI8xImkceJ5Xo",[609,615],{"title":610,"path":611,"stem":612,"description":613,"icon":614,"children":-1},"Server exports","/docs/jobs/jobcreator/api/server-exports","1.docs/0.jobs/6.jobcreator/5.api/2.server-exports","Read job data, manage employees and connect company payments from another server script.","i-lucide-server",{"title":616,"path":617,"stem":618,"description":619,"children":-1},"Changelog","/docs/jobs/jobcreator/changelog","1.docs/0.jobs/6.jobcreator/9.changelog","Publication status and future update notes for the Job Creator beta.",[],1792862185683]