Coder Social home page Coder Social logo

tf2attributes's Introduction

tf2attributes

TF2Attributes SourceMod plugin

https://forums.alliedmods.net/showthread.php?t=210221

Now featuring the following functionality from nosoop/tf2attributes

Add / remove temporary attributes on the player (using the game's own time-based expiry mechanism for it).

// replicates the temporary health bonus granted by the Dalokohs Bar:
TF2Attrib_AddCustomPlayerAttribute(client, "hidden maxhealth non buffed", 50.0, 30.0);

Adds the game's "attribute hook" mechanism that collates values using an attribute class:

// computes the final damage multiplier based on the given item and owner's attributes:
float damageBonus = TF2Attrib_HookValueFloat(1.0, "mult_dmg", weapon);

Support for setting / getting attribute values via strings:

// set an entity's custom projectile model:
TF2Attrib_SetFromStringValue(entity, "custom projectile model", "models/weapons/c_models/c_grenadelauncher/c_grenadelauncher.mdl");

// get the name from an item:
TF2Attrib_HookValueString("NO NAME", "custom_name_attr", entity, buffer, sizeof(buffer));

Setting custom names / descriptions is not possible. String values that are set by this plugin are not replicated to the client โ€” this is fine for attributes that are only accessed on the server, but if you set any that the client will read, the client will crash on access.

Installing or updating to 1.7

All plugins compiled for previous versions should continue to work with this one. The installation instructions remain the same as before

  1. Download all the non-source code files in the latest release.
  2. Copy tf2attributes.smx to addons/sourcemod/plugins/.
  3. Copy tf2.attributes.txt to addons/sourcemod/gamedata/.
  4. If you're a developer, copy tf2attributes.inc to addons/sourcemod/scripting/include/ (or the appropriate path for your compiler toolchain / project).

tf2attributes's People

Contributors

nosoop avatar flaminsarge avatar mentrillum avatar kenzzer avatar joinedsenses avatar akowald avatar deathreus avatar rafradek 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.