Adding or Modifying Props

The Fuel Siphon Script comes with several default prop groups pre-configured for you. These default props allow players to siphon fuel from tanks, trailers, gas pumps, and more. However, the system is fully customizable, allowing you to add new siphon-able props and modify existing ones.


How to Add or Modify Props

To add or modify siphon-able props, you'll need to edit the data.props module in the script. Here’s a breakdown of how each field works:

return {
    small_trailer = {
        props = { `prop_air_fueltrail1`, `prop_air_fueltrail2` }, -- List of props this applies to
        label = "Siphon Gasoline", -- Text shown in target + UI
        icon = "fas fa-gas-pump", -- FontAwesome icon for DUI + targeting
        duration = 12, -- Time (seconds) to fill the bucket
        cooldown = 120, -- Cooldown time (seconds) before siphoning again
        global_cooldown = true, -- If true, cooldown is shared by all players

        alerts = { -- Optional police alerts
            chance = 100, -- % chance to alert police
            jobs = { "police", "fib" }, -- Job names to alert
            on_duty_only = true -- Trigger only for on duty officers
        },

        guard = { -- Optional hostile NPCs
            chance = 0, -- % chance to spawn guards on siphon start
            count = { min = 3, max = 5 }, -- Random number of peds in range
            models = { `s_m_y_armymech_01` }, -- Ped model(s) to choose from
            weapons = { -- Weighted weapon list (higher = more likely)
                { hash = `WEAPON_WRENCH`, weight = 50 }, -- Common melee weapon
                { hash = `WEAPON_CARBINERIFLE`, weight = 50, ammo = 100 } -- Rare ranged weapon with ammo
            }
        },

        explode = { -- Optional explode chance
            chance = 0,  -- Chance of explosion happening
            explode_when = "random", -- "on_collect" - When player collects | "random" - Randomly throughout siphon process
            damage_radius = 10.0,  -- Radius of the explosion
            damage = 200.0,  -- Damage caused by explosion
            explosion_type = 2  -- Explosion type (2 is a normal explosion)
        },

        reward = { -- Reward given after successful siphon
            id = "gasoline", -- Internal item name
            label = "Gasoline", -- Friendly display name
            min = 2, max = 5 -- Random amount between min and max
        }
    }
}

Prop Options Explained

  1. props:

    • This is the list of prop models that the siphoning system will apply to. You can add or remove prop models here as needed.

  2. label:

    • This is the label that will be displayed in the target UI when interacting with the prop.

  3. icon:

    • FontAwesome icon used for UI representation and targeting. You can use any supported icon here.

  4. duration:

    • The duration (in seconds) it takes to siphon fuel from the prop.

  5. cooldown:

    • The cooldown (in seconds) before players can siphon the same prop again.

  6. global_cooldown:

    • If set to true, the cooldown is shared globally across all players. If set to false, each player will have their own cooldown.

  7. alerts:

    • chance: The chance (in percentage) to alert the police when siphoning fuel.

    • jobs: Specifies which jobs (e.g., police, fib) will be alerted.

    • on_duty_only: If set to true, only on-duty officers will be alerted.

  8. guard:

    • chance: The percentage chance for guards to spawn when siphoning fuel.

    • count: Defines the random number of guards that can spawn.

    • models: The list of NPC models that can spawn as guards.

    • weapons: Defines the weapons the guards can have, with weights to make certain weapons more likely.

  9. explode:

    • chance: The percentage chance that an explosion will occur during siphoning.

    • explode_when: Defines when the explosion happens ("on_collect" for when the siphon is collected, "random" for random explosions).

    • damage_radius: The radius of the explosion.

    • damage: The damage caused by the explosion.

    • explosion_type: The type of explosion (2 is a normal explosion).

  10. reward:

    • id: The internal ID for the reward item.

    • label: The label for the reward item.

    • min and max: Defines the random range of the reward given after successful siphoning.


Adding New Props

To add new props, simply copy one of the existing prop definitions and change the model names, labels, icons, and other values as needed. You can even modify the behaviour (e.g., change the explosion chance, duration, or reward).

For example, if you want to add a new prop for a fuel barrel, you would do something like:

new_fuel_barrel = {
    props = { `prop_fuel_barrel_01` }, -- New prop model
    label = "Siphon Fuel Barrel",
    icon = "fas fa-gas-pump",
    duration = 10,
    cooldown = 60,
    reward = { id = "gasoline", label = "Gasoline", min = 5, max = 10 }
}

You can add this entry to the data.props table, and it will become a siphonable object in your game!


Final Steps

Once you’ve added or modified props, the new settings will be applied automatically. Restart the server or resource for the changes to take effect.

Last updated