Creating Items

All of the items are defined in the items.lua file with key, value pairs. Key is the name (not the label) of an item and the value is a table containing the options for the item.

question(?) marks are not mandatory.

  • Item Options

    • label: string | Record<string, string>

    • weight: int

    • type: item | weapon

    • image?: string (docs)

    • shouldClose?: boolen

    • description: string | Record<string, string>

    • server?: table

      • export?: string

    • consume?: number

      • Item count needed and removed use.

    • client?: table

      • export?: string (Export to be triggered after item use)

      • event?: string (Client event to be triggered after item use)

      • status?: table (Adjust esx_status/qb values after use)

      • anim?: table (Animation that will be played during the progress bar)

        • dict: string

        • clip: string

      • prop?: table (Attached prop that will be displayed during the progress bar)

        • model: string or hash

        • pos: table (x, y, z)

        • rot: table (x, y, z)

        • bone?: number

        • rotOrder?: number

      • disable?: table (Actions to be disabled during the progress bar)

        • move?: boolean

        • car?: boolean

        • combat?: boolean

        • mouse?: boolean

      • usetime?: number (Progress bar duration)

      • cancel?: boolean (If set to true the player canc cancel item use)

      • notification?: string (Notification to be sent when the item is used)

      • add?: function(total: number)

        • Function that triggers when receiving an item

        • Returns total item count as total

      • remove?: function(total: number)

        • Function that triggers when removing an item

        • Returns total item count as total

    • buttons?: table

      • label: string

      • action: function(slot: number)

        • Callback function when button is clicked in context menu, returns item slot.

Exmaple Mutli language labels

Last updated