WARNING: THIS PLUGIN WILL GET YOUR SERVER GSLT BANNED.
You may be thinking, why another knives plugin for CS:GO?
The answer, this plugin uses DHooks to hook GiveNamedItem to process knife selections. The result is a 100% stable knives plugin with a very simple implementation. This is built to determine if this implementation will stop servers crashing with plugins that are well know to crash with Klexen's knife upgrade plugin.
This plugin doesn't respawn your knife, It hooks your knife being spawned and sets the definition index to your selection. This means a few things:
Features:
* Servers "shouldn't" crash at all!
* If you have a knife selected in your loadout, this plugin will replace that knife!
* All knives come with StatTrak counters which actually work!
* Preference storage to MySQL!
Installation:
1. Install Latest
DHooks!
2. Add "knives" entry into database.cfg (note: you can use cvar knives_database_name to use another entry)
3. Copy the contents of the attached zip into your "/csgo/addons/sourcemod/" directory
4. Restart your server
5. Type !knife in game to open the knife selection menu
Convars:
Code:
knives_database_name "knives"
knives_safemode 0
knives_restore_itemid 0
Know Issues:
This plugin relies on game data to function properly. When Valve push large updates the game data may require updating. I will always update it as quickly as possible and post it in this thread. Otherwise, for those of you smart enough, you can find the offsets
here. The virtual offset name is 'CCSPlayer::GiveNamedItem'.
Notes:
Currently this is a very basic plugin. If this works well (doesn't cause crashes) I plan to implement a few more features.
* Auto data loading from CSGO game data (no configs).
* Forwards for paintkit plugins to force fallback data
* More !commands like !flip and !butterfly
Feedback:
Reply in this thread with your plugin list if you experience any crashes. If you get crashes with Klexen's knife upgrade plugin and not this plugin, also post to let me know.
Updates:
Version 1.2.0
* Added Display Type feature that allows players to control how their weapon items spawn
* Added safeguard to pre hook (should stop any server crashes)
* Added debug messages to help a bug that stops players having their knife spawned
Version 1.1.4
* Fixed lots of client crashes (hopefully)
* Your loadout paintkit for your knife now leaks to !knife selection (again)
Version 1.1.3
* Fixed weapon index error related to knives_restore_itemid
* Fixed memory lead related to knives_restore_itemid
Version 1.1.2
* Fixed lots of client crashes (hopefully)
* Added cvar knives_restore_itemid (default 0) for testing
Version 1.1.1
* Fixed steamid's not storing properly in MySQL database
* Added convar knives_safemode (default 0) for testing
Version 1.1.0
* Added MySQL support for preference saving
* Added StatTrak counters
Version 1.0.2
* Fixed bug in GiveNamedItem prehook
Version 1.0.1
* Disabled players inventory paintkit from applying to their selected knife
* Fixed animation glitches for the falchion and butterfly knives
* Bots are not processed