Interactive Oilwells (Updated 2026)

Interactive Oilwells  (Updated 2026)

£20.00

Add to Basket

Updated : 

Fix for Oil well Placement when new player joins the Server.

Fix for Duplicate Barrels in Production
Fix For  Duplicate Barrels On Pickup and Drop

Few other Small Fixes for Sync Issues and DB saving 


Place Oil Wells:

  • Players can use an "oilwell" item from their inventory to place an oil well at their current location.
  • The system checks if the player has reached the maximum allowed oil wells (Config.Maxoilwells) before placement.
  • A 10-second animation (WORLD_HUMAN_CROUCH_INSPECT) plays during placement, and the oil well is added to the game world and database.
  • Interact with Oil Wells:
    • Players can approach their oil wells (within 2.0 units) and access a menu (via rsg-target) with options:
      • Check Status: View the oil well’s ID, owner, quality (0-100%), and coal amount.
      • Add Coal: Add 5 coal from the player’s inventory to fuel barrel production (up to 100 coal max).
      • Destroy Oil Well: Remove the oil well after a confirmation prompt and progress bar (Config.CollectTime), returning the "oilwell" item to the player.
      • Repair Oil Well: Restore quality to 100% using 1 iron bar, 5 wood, and cash (cost = damage * Config.RepairCost), with a repair animation (Config.RepairAnimation) and progress bar (Config.RepairTime).
  • Manage Barrels:
    • Pick Up Barrels: Players can interact with barrels (within 3.0 units) near an oil well to pick them up, triggering an animation (AttachBarrelToPlayer) and removing the barrel from the world.
    • Drop Barrels: Players can drop carried barrels at a new location, updating their coordinates in the database and respawning them for all clients.
    • Sell Barrels: Players can sell up to 3 barrels at a time for cash (Config.BarrelPrice per barrel), with the system verifying barrel ownership and deleting them from the database upon sale.
  • Automatic Barrel Production:
    • Oil wells with coal (>0) and quality (>0) may spawn barrels (up to 10 per well) during the cron job (Config.CronJob), based on a probability (Config.crudeoilbarrelChance).
    • Barrels spawn at offsets around the oil well (Config.BarrelSpawnOffsets) and are targetable for pickup.
  • Maintenance and Risk:
    • Players must add coal to keep oil wells operational. Without coal, no barrels are produced.
    • Oil wells lose 1% quality per cron job cycle. If quality reaches 0, the oil well is removed, along with its barrels (via database cascade).
    • Players must repair oil wells to maintain quality, requiring resources and cash.
  • Visual and Interactive Elements:
    • Oil wells have blips on the map (Config.Blip) for easy location.
    • Barrels and oil wells are interactive via rsg-target prompts (“Interact with Oil Well” and “Carry Barrel”).
    • Notifications (via ox_lib) inform players of actions like successful coal addition, repairs, or errors (e.g., insufficient resources).