[{"data":1,"prerenderedAt":174},["ShallowReactive",2],{"/docs/scripts/shops":3,"/docs/scripts/shops-surround":166,"/docs/scripts/shops-implemented-suggestions":173},{"id":4,"title":5,"body":6,"description":156,"extension":157,"head":158,"implementedSuggestions":158,"meta":159,"navigation":160,"path":161,"schemaOrg":158,"seo":162,"sitemap":163,"stem":164,"__hash__":165},"docs/1.docs/scripts/shops.md","Shops",{"type":7,"value":8,"toc":151},"minimark",[9,14,23,35,59,74,78,120,123,127,140,147],[10,11,13],"h2",{"id":12},"installation","Installation",[15,16,17,18,22],"p",{},"The database storage and automatic legacy-file migration described here are available from ",[19,20,21],"strong",{},"1.0.11",".",[15,24,25,26,30,31,34],{},"Install current ",[27,28,29],"code",{},"sky_base",", select ",[19,32,33],{},"oxmysql"," in its configuration, and start the database,\nframework and other configured integrations first:",[36,37,43],"pre",{"className":38,"code":39,"filename":40,"language":41,"meta":42,"style":42},"language-cfg shiki shiki-themes material-theme-lighter material-theme material-theme-palenight","ensure sky_base\nensure sky_shops\n","server.cfg","cfg","",[27,44,45,53],{"__ignoreMap":42},[46,47,50],"span",{"class":48,"line":49},"line",1,[46,51,52],{},"ensure sky_base\n",[46,54,56],{"class":48,"line":55},2,[46,57,58],{},"ensure sky_shops\n",[15,60,61,62,65,66,69,70,73],{},"Shops creates its tables automatically through ",[27,63,64],{},"Sky.DB.Migrate",". You do not need to import\n",[27,67,68],{},"import.sql"," manually or grant ",[27,71,72],{},"add_filesystem_permission sky_base write sky_shops",".\nThe database user needs permission to create and alter tables and to read and write their data.",[10,75,77],{"id":76},"updating-an-existing-installation","Updating an existing installation",[79,80,81,92,110,117],"ol",{},[82,83,84,85,88,89,22],"li",{},"Stop ",[27,86,87],{},"sky_shops",". Back up its database tables and the existing ",[27,90,91],{},"data/shops.json",[82,93,94,95,98,99,102,103,106,107,109],{},"Replace the resource files, including ",[27,96,97],{},"fxmanifest.lua",", the complete ",[27,100,101],{},"source"," folder and\n",[27,104,105],{},"config/shop_locations.lua",". Restore your old ",[27,108,91],{}," before the first start.",[82,111,112,113,116],{},"Start the resource and check for ",[27,114,115],{},"[sky_shops] Legacy data migration complete"," in the console.",[82,118,119],{},"Keep the old file as a backup. Later restarts load the database and do not import it again.",[15,121,122],{},"All saved shop entries are imported in their original order, including shop types, positions,\nNPC positions and headings. An invalid file or failed database transaction prevents startup\nwithout deleting the original file or committing part of the import. Fix the reported problem\nand restart. The tables must use InnoDB. Do not delete migration markers to repeat an import.",[10,124,126],{"id":125},"configuration-and-new-shops","Configuration and new shops",[15,128,129,130,133,134,136,137,139],{},"Configure shop types, items, prices and interactions in ",[27,131,132],{},"config/config.lua",".\nOn a fresh database without an old ",[27,135,91],{},", the initial locations come from\n",[27,138,105],{},". Changing that file later does not overwrite database locations.",[15,141,142,143,146],{},"Use the administrator command ",[27,144,145],{},"/createshop"," and select a shop type to save a new shop at your\ncurrent position. The shop is shown to players only after it has been saved in the database.",[148,149,150],"style",{},"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":42,"searchDepth":49,"depth":55,"links":152},[153,154,155],{"id":12,"depth":55,"text":13},{"id":76,"depth":55,"text":77},{"id":125,"depth":55,"text":126},"Install Sky Shops and migrate existing shop locations into the database.","md",null,{},true,"/docs/scripts/shops",{"title":5,"description":156},{"loc":161},"1.docs/scripts/shops","b2j2ZrVQ1VC4WsC5Sc5Q1mhndQ7TBDKq_5JW-2JO194",[167,158],{"title":168,"path":169,"stem":170,"description":171,"icon":172,"children":-1},"Image Creator","/docs/scripts/imagecreator","1.docs/scripts/imagecreator","Create transparent FiveM images through a searchable menu, quick commands, batch generation, and automatic CDN, Discord, or local exports.","i-lucide-camera",[],1790029449685]