[ESX] sc_package

:package: ESX Package Script

This script allows players to receive and open special “packages” as items in their inventory. Each package contains predefined rewards (e.g. food, drinks) that are placed directly in the inventory when opened. The animation and a progress bar provide an immersive experience.

Features

  • Packages as items: Players can collect and use different packages.
  • Rewards: Each package contains individually configurable items and quantities.
  • Animated opening: Progress bar and animation when opening a package.
  • Place & Pick Up: Packages can be placed on the ground and picked up again.
  • Multilingual: Support for German, English, Spanish and French.
  • ESX-compatible: Uses the ESX framework and is easy to integrate.

What’s new?

  • Multilingual notifications: All text and notifications are now available in multiple languages.
  • Place and pick up: Packages can not only be opened, but also placed and picked up again later.
  • Improved configuration: Package contents and names are now easily customizable in config.lua.
  • Progress indicator: When opening a package, a progress indicator with animation is displayed.
  • Optimized server and client communication: Stable events and better error handling.

What else is needed?

To get the most out of the script you need:

ESX-Legacy

sc_progress

How to install?

Clone or download this repository

Add sc_package to your resources directory

Add this in your server.cfg :

ensure sc_package

Add the SQL file to your database

Download:

sc_package-main.zip (49.0 KB)

Config.lua

Config = {}

Config.Locale = 'en'

Config.Items = {
    ["package1"] = {
        name = "itemname1", --Package name // name = "Beer crate",
        newItem = "newitem1", --Item name // newItem = "beer",
        newItemLabel = "itemname1", --name of the item for notification // newItemLabel = "Beer",
        newItemCount = 6 --how much you should get from the package // newItemCount = 6
    },
    ["package2"] = {
        name = "itemname2",
        newItem = "newitem2",
        newItemLabel = "itemname2",
        newItemCount = 6
    },
    -- ["package3"] = {
    --     name = "itemname3",
    --     newItem = "newitem3",
    --     newItemLabel = "itemname3",
    --     newItemCount = 6
    -- },
    -- ["package4"] = {
    --     name = "itemname4",
    --     newItem = "newitem5",
    --     newItemLabel = "itemname6",
    --     newItemCount = 6
    -- },
    -- ["package5"] = {
    --     name = "itemname5",
    --     newItem = "newitem5",
    --     newItemLabel = "itemname5",
    --     newItemCount = 6
    -- },
    -- ["package6"] = {
    --     name = "itemname6", --Package name
    --     newItem = "newitem6", --item you get from the box
    --     newItemLabel = "itemname6", --Name of the item you get from the box (for the notification message)
    --     newItemCount = 6 --How many items you get from the box
    -- },
    -- Add more
} 
Code is accessible Yes
Subscription-based No
Requirements ESX
Support Yes

» Check out my other resources

» sc_phonetax [FREE]
» sc_extinguisher [FREE]
» sc_animatedNPC [FREE]
» sc_dumpster-diving [FREE]
» sc_hud [FREE]
» NEW DESIGNS FOR JSFOUR-IDCARD [FREE]

4 Likes