Giter Club home page Giter Club logo

hats's Introduction

Hats

English | Русский

Hats

AMX Mod X plugin for Counter-Strike.

The plugin allows the player to wear hats on their heads. The main feature of this modification is the player's ability to choose a skin or a submodel of a headgear on his own and set which of them will be available exclusively to VIP players.

Commands

  • amx_givehat <player's name> <hat id> <skin/submodel id> — put on/take off the hat to the player by the player's name (available for users with the "l" flag and in the server console);
  • amx_removehats — remove hats from each player (available for users with the "l" flag and in the server console);
  • hats — console command to call the hat selection menu;
  • say /hats or say_team /hats — chat command to call the hat selection menu.

Configuration

The plugin provides two ways to edit the list of hats: using files amxmodx/configs/hats.json and amxmodx/configs/hats.ini. The JSON method is more structured and allows for naming of hat's submodels and skins (otherwise the names will be retrieved from the model file), but less compact. The default is the first method. To switch to .ini format, you need to delete or comment out the line #define USE_JSON. The plugin automatically detects the number of skins and submodels, so there is no need to set them manually.

Configuration via hats.json

In addition to the hat name, the markup contains the following fields:

  • model: string model file name;
  • tag: character tag (you can leave it blank if you don't want to use skins/submodels);
  • vip: true|false access for VIP players only (optional field);
  • items: array of strings names of skins/submodels in the menu (optional field).

Example:

{
    "Santa": {
        "model": "santa_hat_v2.mdl",
        "tag": "s",
        "items": [
            "Red Santa",
            "Blue Santa",
            "Magenta Santa",
            "Cyan Santa"
        ]
    },
    "Dragon Nest Pack": {
        "model": "hats_dn.mdl",
        "vip": true,
        "tag": "b"
    },
    "Minecraft": {
        "model": "pony_antagonist.mdl",
        "tag": "s"
    },
    "Captain BaseBallBat-Boy": {
        "model": "CaptainBaseBallBat-Boy.mdl"
    }
}

Configuration via hats.ini

The hat registration format: "mdl" "vtagname"

where:

  • mdl — model file name;
  • v — access for VIP players only (for regular players, you can leave it blank);
  • tag — tag (you can leave it blank if you don't want to use skins/submodels);
  • name — name of the hat in the menu.

Example:

  • "Headcrab.mdl" "Headcrab" — headcrab hat without additions;
  • "santa_hat_v2.mdl" "sSanta" — Santa hat with all skins;
  • "pony_v2.mdl" "cPony" — pony hat with skins and submodels;
  • "pony_antagonist.mdl" "vcPony Antagonist" — pony VIP hat with skins and submodels.

Tags:

  • s — only skins will be read;
  • b — only submodels will be read;
  • c — a universal type that does not exclude the possibility of having skins and submodels in the hat at the same time (use it if you are in doubt about choosing a tag or want to combine skins and submodels);
  • t — skin or submodel will be set according to the player's team.

Requirements

Authors

hats's People

Contributors

psycrow101 avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  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.