Zero´s Trashman 🗑️ (Trash Script) [Re:Coded]

(25)
(594)
You can always read the reviews or discuss this product
Media gallery
Trailer
Buy product
In short

This script adds a Trashman Job for DarkRP. Players can make money by collecting , burning or recycling trash.

You play as a Trashman which job it is to collect trash and either Burn it or Recycle and sell it to a Recycled Trash Buyer machine to make money.

Trash can be found at custom trash spawns arround the map, in manholes, in leafpiles , in predefined models arround the map and even on players.

Trashgun

  • The primary action of the trashgun is used to Blast away leafpiles which can reveal trash and the secondary action is to collect trash.
  • While collecting trash the gun levels up, higher levels increases the guns trash capacity and decreases its shoot interval.
  • The player can drop the collected trash in to trashbags by pressing the Middle Mouse Button.


Trashburner

  • The trashburner burns trash and returns money, this is the default way to make money but doesent give as much money as the Recycling machine.


Recycling Machine

  • The recycling Machine recycles trash in to Blocks which can be sold at the Buyermachine.
  • Depending on what Ressource is selected the machine needs more Trash and Time.


Buyermachine

  • The buyermachine takes recycled trash blocks and gives you money for on payout.


Manholes

  • Manholes can be opend and sometimes reveal trash.


Leafpiles

  • Leafpiles can be blasted aways and sometimes spawn trash entities arround it.


Trashbag

  • The Trashbag gets created by the Trashgun on MMB and has the Trash from the gun.
  • Each Player can only spawn a few of them before the limit is reached.


Tutorials:

French Tutorial by KADABRA


  • SAM Support
  • Xenin Inventory Support
  • xAdmin Support
  • Collecting / Recycling Gameplay
  • Level System for Trashgun
  • Holo UI for Trashgun
  • Many diffrent ways to get Trash
  • Itemstore support for Recycled Trash Blocks
  • DRM Free
  • Fully Customizable
  • Multi Language Support
  • Custom models
  • Custom Animations
  • Custom materials
  • Custom particles
  • Optimized system (Level of Detail)


// This enables the Debug Mode
ztm.config.Debug = false

// Switches between FastDl and Workshop
ztm.config.FastDl = false

// The language , en , de , cn , ru , fr
ztm.config.SelectedLanguage = "en"

// Currency
ztm.config.Currency = "$"

// Unit of weight
ztm.config.UoW = "kg"

// These Ranks can use the save command  !saveztm or use the admin settings from the Q Menu
ztm.config.AdminRanks = {"superadmin","owner"}

// How much damage is needed to destroy the entity, Change it -1 to disable it
ztm.config.Damageable = {
    ["ztm_trashbag"] = 100,
}

// General Trash config
ztm.config.Trash = {
    // Custom Spawn Points can be created with the Trash Spawner Toolgun
    spawn = {
        // Do we want to spawn trash using custom spawn points?
        enabled = true,

        // How often should we try to spawn new trash?
        time = 15, // seconds

        // How many trash entities are allowed to exist on the map at the same time?
        count = 10,

        // The max amount of trash a trash entitiy can have
        trash_max = 30, // kg

        // The min amount of trash a trash entitiy can have
        trash_min = 15, // kg
    },

    // How long does the trash entity has to be idle before it gets removed
    cleanup_time = 120,

    // These models will be used as trash models
    models = {
        "models/zerochain/props_trashman/ztm_trash_apple.mdl",
        "models/zerochain/props_trashman/ztm_trash_box01.mdl",
        "models/zerochain/props_trashman/ztm_trash_box02.mdl",
        "models/zerochain/props_trashman/ztm_trash_can01.mdl",
        "models/zerochain/props_trashman/ztm_trash_can02.mdl",
        "models/zerochain/props_trashman/ztm_trash_cap01.mdl",
        "models/zerochain/props_trashman/ztm_trash_fish.mdl",
        "models/zerochain/props_trashman/ztm_trash_paper.mdl",

        "models/props_junk/garbage_bag001a.mdl",
        "models/props_junk/garbage_milkcarton001a.mdl",
        "models/props_junk/garbage_milkcarton002a.mdl",
        "models/props_junk/garbage_newspaper001a.mdl",
        "models/props_junk/garbage_plasticbottle001a.mdl",
        "models/props_junk/garbage_plasticbottle002a.mdl",
        "models/props_junk/garbage_plasticbottle003a.mdl",
        "models/props_junk/metal_paintcan001a.mdl",
        "models/props_junk/garbage_metalcan001a.mdl",
        "models/props_junk/garbage_metalcan002a.mdl",
        "models/props_junk/Shoe001a.mdl",
        "models/props_lab/box01a.mdl"
    }
}

// Makes players a source of trash
ztm.config.PlayerTrash = {

    // Do we want to make players dirty, which makes them a source of trash? :p
    Enabled = true,

    // How often should we try to make players dirty?
    Interval = 60,

    // How many players can be dirty at the same time?
    Count = 3,

    // How much trash can a player get
    Limit = 50, //kg

    // The max increase amount
    trash_max = 30, // kg

    // The min increase amount
    trash_min = 15, // kg

    // This restrict so that only certain jobs get dirty (Leave empty to disable the job check)
    jobs = {
        //["Gangster"] = true,
    },
}

// World props which can be used as a trash source
ztm.config.TrashCans = {

    // Do we want to use entities on the map with trashcan models to be used as a source of getting trash?
    Enabled = true,

    // How often should the trashcans increase their trash
    Refresh_Interval = 60,

    // How much should the trash increase
    Refresh_Amount = 5,

    // These classes are allowed to be trashcans, just to make sure we dont use any random entity which might have one of the models below
    class = {
        ["prop_dynamic"] = true,
        ["prop_physics"] = true,
    },

    // These models will be searched in the map on server start and used as trashcans where the player can collect trash
    // Note: Models on the map which are prop_static cant be detected
    // You can use ztm_debug_GetModel in the console to check if the model you are looking can be detected via lua and what its model is
    models = {
        ["models/props_lab/scrapyarddumpster_static.mdl"] = 200, // This value defines how much trash the entity can hold
        ["models/props_junk/trashdumpster01a.mdl"] = 100,
        ["models/props_junk/trashbin01a.mdl"] = 50,
        ["models/props_trainstation/trashcan_indoor001a.mdl"] = 30,
        ["models/props_trainstation/trashcan_indoor001b.mdl"] = 30,
    }
}

// Trash source which sometimes reveals trash
ztm.config.Manhole = {
    // The max amount of trash Manhole can have
    max_amount = 100, // kg

    // The max amount of trash Manhole can have
    min_amount = 50, // kg

    // How long til a manhole can have trash again
    cooldown = 60, // seconds

    // The chance of the manhole having trash
    chance = 60, // %
}

// Leafpile which needs to get blown away and may reveal trash
ztm.config.LeafPile = {
    // The max amount of trash a leafpile can have
    trash_max = 30, // kg

    // The min amount of trash a leafpile can have
    trash_min = 15, // kg

    // How many trash entities can a leafpile spawn
    trash_count = 6,

    //How high is the chance that the leafpile actully has trash
    trash_chance = 50, // %


    /////// Spawn ///////

    // How many leaf piles are allowed to be active at once
    refresh_count = 3,

    // How often do we refresh random leafpiles, only if the spawn_count limit isnt reached yet.
    refresh_interval = 120,

    // How long til a leafpile can be used again
    refresh_cooldown = 60
}

ztm.config.Trashbags = {
    // How many trashbags can the player spawn?
    limit = 3,

    // How much trash can a trashbag hold?
    capacity = 100,
}

// The SWEP for collecting trash
ztm.config.TrashSWEP = {

    // How much xp does the player gain per kg of trash
    xp_per_kg = 1,

    // Here you can modify the xp a player gets for collecting trash
    xp_modify = function(ply,xp)

        if ply:IsSuperAdmin() then
            xp = xp * 2
        end

        return xp
    end,

    // Do we allow the player to manipulate phys objects with the Blast function of the swep?
    allow_physmanipulation = false,

    // How often should we save the level data from the players if it has changed.
    data_save_interval = 100,

    // Here you can add more levels
    level = {
        [1] = {
            next_xp = 1000, // The needed xp to get the next level
            primaty_interval = 3, // The interval for the Air Burst action
            secondary_interval = 0.5, // The trash sucking interval
            inv_cap = 100 // The trash capacity of the swep
        },
        [2] = {
            next_xp = 3000,
            primaty_interval = 2,
            secondary_interval = 0.4,
            inv_cap = 150
        },
        [3] = {
            next_xp = 6000,
            primaty_interval = 1,
            secondary_interval = 0.3,
            inv_cap = 200
        },
        [4] = {
            next_xp = 9000,
            primaty_interval = 0.5,
            secondary_interval = 0.2,
            inv_cap = 250
        },
        [5] = {
            next_xp = 15000,
            primaty_interval = 0.25,
            secondary_interval = 0.1,
            inv_cap = 300
        },
    }
}

// This function will spawn the money
ztm.config.MoneySpawn = function(pos, money)

    // The default DarkRP way to spawn money
    return DarkRP.createMoneyBag(pos, money)
end

// Used to burn trash and earn money
ztm.config.TrashBurner = {

    // How much trash can the burner chamber hold
    burn_load = 1000,

    // How long does it take to burn 1kg of trash
    burn_time = 0.1, // seconds per kg

    // How much money does the player get per kg of trash
    money_per_kg = 10,
}

// Used to recycle trash
ztm.config.Recycler = {

    // How much trash can the recycle chamber hold
    capacity = 1000,

    // These jobs are allowed to use the recycler (Leave empty to disable)
    job_restriction = {
        ["Trashman"] = true,
    },

    // These ranks are allowed to use the recycler
    rank_restriction = {
        ["VIP"] = true,
        ["superadmin"] = true,
    },

    // Here you can add more recycle types
    recycle_types = {
        [1] = {
            // Name of the Recycled Ressource
            name = "Paper",

            // How much trash will be need to make one block of this ressource
            trash_per_block = 100, //kg

            // How long does it take to recycle the trash to this ressource
            recycle_time = 10,

             // The money the player gets for one block of this ressouce
            money = 1200,

            // The material which gets used on the Recycled Ressource model
            mat = "zerochain/props_trashman/recycleblock/ztm_recycledblock_paper_diff"
        },
        [2] = {
            name = "Aluminium",
            trash_per_block = 200,
            recycle_time = 30,
            money = 3000,
            mat = "zerochain/props_trashman/recycleblock/ztm_recycledblock_aluminium_diff"
        },
        [3] = {
            name = "Plastic",
            trash_per_block = 300,
            recycle_time = 60,
            money = 6000,
            mat = "zerochain/props_trashman/recycleblock/ztm_recycledblock_plastic_diff"
        },
        [4] = {
            name = "Glass",
            trash_per_block = 400,
            recycle_time = 100,
            money = 10000,
            mat = "zerochain/props_trashman/recycleblock/ztm_recycledblock_glass_diff"
        },

        [5] = {
            name = "Precious Metals",
            trash_per_block = 700,
            recycle_time = 240,
            money = 25000,
            mat = "zerochain/props_trashman/recycleblock/ztm_recycledblock_metal_diff"
        },
    }
}


How can i save the entities on the map?

If you are a admin you can just type !saveztm in chat or use the Admin Settings at Q > Options > Admin Settings


What Gamemodes does this addon support?

Currently it supports DarkRP.


Will you provide support?

Yes, I will provide free support all the time if I am available.


What is required for this?

Half life 2 and the contentpack.


Where can i find the Content Pack?

https://steamcommunity.com/sharedfiles/filedetails/?id=1795813904

General



Language Translations


oilrush

zmlab

miner

fruit

coinpusher

pyro

box

Product reviews

4.88 average based on 25 reviews

Ananace
Un JOB original
Les modèles sont très réalistes avec une touche japonaise qui rend super bien. L'addon s'adapte à plusieurs type de serveur et son fonctionnement est intuitif. La configuration est simple et propose beaucoup de personnalisation. Je recommande.
By Ananace -
(version 1.6.2)
Griffith did nothing wrong
Very satisfied!
This is a rad little mod. It's simple, yet complex, like most of Zero's work. He's definitely earned a special place on my server's addon list. This is just adorable in so many ways, and I love scooping up trash to recycle. It's great fun, which took me by surprise. Being a garbage worker doesn't sound very exciting at first, but it's implementation is delightful. Big recommend!!
By Griffith did nothing wrong -
(version 1.6.0)
Viking_Adoranicus (Aka Viking)
As michael rosen would say, it was a bit rich but okay
This addon was in many servers I was moderator for, from 2019 to 2022, it is just a great and odd thing to have. Editing is simple, it's great for economy building, the mechanics & job are really fun to play with, overall I love it. Honestly I wish this thing was continued tho.
By Viking_Adoranicus (Aka Viking) -
(Never downloaded)
noodleprime
Fun Addon to add more depth to your DarkRP server
This mod is very polished and is simple to set up and simple for players to understand. No issues at all getting set up and works very well
By noodleprime -
(version 1.5.3)
BenJ
Perfect!
I can finally become my dream job, of being a trashman!
This product was received for free
By BenJ -
(version 1.2.5)
previous
1 of 6
next
Buy product
💥Zero & Kobralost´s Team
31 products - 3 members
Looking for reliable and easy-to-use game server hosting with free Anycast and DDoS protection? Get 30% off your first payment at Physgun with the coupon code gmodstore at checkout.
Product details
Views:
57.4K
Purchases:
1,904
Added:
Updated:
Price:
$7.99
Categories:
Languages:
Russian, English, German, Polish, Danish, Turkish, French, Chinese, Spanish
Requirements
  • https://steamcommunity.com/sharedfiles/filedetails/?id=2532060111
Actions
Report
Search products...