Git Product home page Git Product logo

gmod-custom-loadout's Introduction

Custom Loadout

A loadout customization addon for Garry's Mod.

GLuaLint Workshop Page

Features

  • Search weapons by name
  • Gives ammo to all weapons
  • Supports URS
  • Supports WUMA
  • Supports Builder-X
  • Server owners can set global ammo limits with custom_loadout_primary_limit and custom_loadout_secondary_limit
  • You can choose which weapon you prefer to hold when the loadout is applied

Developer Notes

If you want to blacklist weapons, you can either install and use URS/WUMA, or copy the example hook below and modify it as you wish.

-- Example: Only allow admins to use the Annabelle 
hook.Add('CustomLoadout.IsWeaponBlacklisted', 'cloadout_blacklist_example', function(ply, weaponClass)
    if weaponClass == 'weapon_annabelle' and not ply:IsAdmin() then
        return true
    end
end)

Returning true prevents the weapon from being given, and also marks them as unavailable on the loadout. Also, keep these in mind:

  • URS/WUMA/BuilderX/sandbox's PlayerGiveSWEP restrictions still apply even if this hook doesn't block a weapon
  • The hook must be added on a shared realm (both on CLIENT and SERVER)
  • It doesn't work in single player (so if you need to test it, do it on a local, peer-to-peer or dedicated server instead.)

Contributing

Please follow the CFC style guidelines before opening pull requests.

gmod-custom-loadout's People

Contributors

styledstrike avatar shockpast avatar wrefgtzweve avatar jonnybro avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.