Skip to main content

createShop

info

This function should be triggered both on clientside and serverside.

Use the function in a shared .lua file!

Data type
---@class ShopStaticData
---@field shopName string
---@field items ShopItem[]
---@field blip? { sprite: number; colour:number; scale:number; }
---@field locations { x: number; y:number; z:number; }[]
---@field peds? { modelName: string; scenario?:string; coords: vector3; heading:number; }[]

Export function to create a shop from another resource.

  • id: string (example: 'General')
  • shopData ShopStaticData
exports["avp_inv_4"]:createShop(id, shopData)