AlliedModders

AlliedModders (https://forums.alliedmods.net/index.php)
-   TF2Items (https://forums.alliedmods.net/forumdisplay.php?f=146)
-   -   TF2Items - Items with custom attributes. (https://forums.alliedmods.net/showthread.php?t=115100)

asherkin 01-10-2010 06:15

TF2Items - Items with custom attributes.
 
This extension allows the attributes, level and quality of items to be modified per player as they are given by the server.

You can join #tf2items @ irc.gamesurge.net if you need help with the extension.

Download & Source:

Download Builds
The tf2items_manager plugin does not come compiled in these builds, you will need to compile it yourself if you want to use it.

Source Code

Instructions:
  1. Copy all files in the release package to your server maintaining the directory structure
  2. Edit tf2items.weapons.txt (In "addons/sourcemod/configs/") according to who you want to get weapons
  3. Type 'sm exts load tf2items'
  4. Join the server
  5. ???
  6. Profit

Notes:
  • The attributes available for tf2items.weapons.txt are here (ignore min/max values).
  • The first key is the number above the attribute you want, and the second is the value.
  • If you load the extension while on the server, it will attempt to hook using a player in the server, otherwise it will only take effect after the next player joins.
  • To reload the tf2items.weapons.txt file you can use 'tf2items_manager_reload'.
  • The included tf2items.weapons.txt file is an example and was made very randomly.

Quality Colours:


Atributions & Thanks:
  • AzuiSleet - Reversed CScriptCreatedItem and released it publicly, along with writing most of the item editing code below.
  • Damizean - Fixed padding for CScriptCreatedItem in Linux. Wrote the SourcePawn Interface and the SourceMod item manager.
  • Voogru - Inspiring the creation of this. Helped with fixing and improving the CScriptCreatedItem class used after the 119 update.
  • Wazz - Wrote "Shit not be void" in #sourcemod and revealed that GiveNamedItem returned CBaseEntity *. Helped with improving the CScriptCreatedItem class.
  • Psychonic - "How did you write the wearable natives asherkin?" "I got all the code from psychonic, then disregarded it and wrote it from scratch."
  • MatthiasVance - Reminded me to comment out '#define INFINITE_PROBLEMS 1'.
  • Drunken_F00l - Inspiring the creation of this.

:3

CrimsonGT 01-10-2010 06:34

Re: [EXTENSION] TF2Items
 
Nice job, looks well written as well.

Thrawn2 01-10-2010 06:57

Re: [EXTENSION] TF2Items
 
holy cow

cybersquare420 01-10-2010 08:11

Re: [EXTENSION] TF2Items
 
link in first line of notes is broken

TheSpyHunter 01-10-2010 08:23

Re: [EXTENSION] TF2Items
 
Great work,
Few questions though.

What do these relate to?

PHP Code:

            "count"        "5"
            "attributes"
            
{
                
"132"    "0"
                "134"    "4"
                "3"        "0.17"
                "97"    "0.6"
                "106"    "0.5"
            
}
        } 

and how do we know what o change them to?

asherkin 01-10-2010 08:28

Re: [EXTENSION] TF2Items
 
Quote:

Originally Posted by TheSpyHunter (Post 1050259)
Great work,
Few questions though.

What do these relate to?
and how do we know what o change them to?

Quote:

The attributes available for customweps.txt are Here (at the bottom, ignore min/max values).
The first key is the number above the attribute you want, and the second is the value.
Make sure the attribute count is correct, otherwise the server will most likely crash, I do not advise going over 7-11, YMMV.
Quote:

Originally Posted by cybersquare420 (Post 1050254)
link in first line of notes is broken

It's a self-signed SSL cert, I've swapped all links for unsecured ones.

Also, a SourcePawn interface is also being worked on, thanks Damizean :)

Cerise 01-10-2010 09:30

Re: [EXTENSION] TF2Items
 
Nice work mate !

Just a question : If you want to custom ALL weapons for a client, do you need to put a block for every weapons one by one ?

asherkin 01-10-2010 09:33

Re: [EXTENSION] TF2Items
 
At the moment, yes. In the next version I plan to add wildcarding and admin flag checks, bear in mind though that you can only currently edit the attributes of the base weapons, not the unlockables. The quality and level are fine however.
Edit: Turns out you can edit the unlockable's attributes, bear in mind that it completely overwrites existing ones though.

Cerise 01-10-2010 10:11

Re: [EXTENSION] TF2Items
 
Concerning the attribute "134" ( Attach Particle effect ),
where should i find which number corresponds to which effect ?

TheSpyHunter 01-10-2010 10:14

Re: [EXTENSION] TF2Items
 
I copied everything to my server, changed the default id to mine and added another admin (lets call him admin(2)), leaving everything else as default.

I rebooted the server then ran the command, waited for admin(2) to join.

I killed them and no weapon showed, they killed me and no weapon showed.

Running mm1.8 sm 1.3, windows.


All times are GMT -4. The time now is 13:46.

Powered by vBulletin®
Copyright ©2000 - 2021, vBulletin Solutions, Inc.