Raised This Month: $51 Target: $400
 12% 

[TF2] Auto Items Manager (v1.5.1h, 2011-09-12)


Post New Thread Reply   
 
Thread Tools Display Modes
Author
Leonardo
Veteran Member
Join Date: Feb 2010
Location: 90's
Plugin ID:
2137
Plugin Version:
1.5.1h
Plugin Category:
Gameplay
Plugin Game:
Team Fortress 2
Plugin Dependencies:
Servers with this Plugin:
 
Plugin Description:
Items manager with auto sql synchronization
Old 12-21-2010 , 05:13   [TF2] Auto Items Manager (v1.5.1h, 2011-09-12)
Reply With Quote #1

What's it?
Another plugin to give custom weapons. But now with auto sql synchronization! Amazing!
Note that
I can only update gamedata because I'm no longer playing in TF2.
Features:
* Giving both weapons and wearable items
* Can detect Medieval mode, Sudden Death and DeathMatch (MeleeOnly) maps
* Can manually enable MeleeOnly mode
* Can be disabled with saving natives at servers w/o unlocks
* Few database queries
* Saving temporal information in a local file
* Using cookies
* Note that it work perfectly only if you know what are you doing.
Requires:
Knowledge of working with SQL
tf2items, visweps, clientprefs
Optional:
pluginautoupdater
How to install:
* Put tf2autoitems.smx in addons/sourcemod/plugins/
* Put tf2autoitems.txt in addons/sourcemod/gamedata/
* Put tf2autoitems.sp in addons/sourcemod/scripting/
* Put tf2autoitems.inc in addons/sourcemod/scripting/include/
* Edit addons/sourcemod/configs/databases.cfg ,
add BEFORE last } (closing curly bracket) this:
Code:
	"tf2items"
	{
		"driver"			"default"
		"host"				"localhost"
		"database"			"tf2items"
		"user"				"yourusername"
		"pass"				"yourpassword"
		"port"				"3306"
	}
How to use:
* Type !settings or !myitems in chat or sm_settings or myitems in console, select class and select weapon from list!
* Also, examples of using TF2AIM_AddItem() native.
* Also2: addons/sourcemod/configs/tf2aim.downloads.txt contains paths to custom models, they will be automaticly added to download tables and precached on each map start.
ConVars:
PHP Code:
// Current plugin version (don't edit)
sm_tf2aim_version "1.5.1f"

// debug level (from 0 to 2)
sm_tf2aim_debug 0

// enable (1) or disable (0) melee mode
sm_tf2aim_meleeonly 0

// enable (1) or disable (0) spycrab mode
sm_tf2aim_crabmode 0 
Commands:
Code:
// Rewind the Updater timer manually.
// Can be called only via server's console.
// Don't use too often!
sm_tf2aim_rewindupdater

// Remote setting new item
// Note that client must be in game
// Can't select multiple clients
// Leave 'class' empty (or -1) to see all classes
// Leave 'slot' empty (or -1) to see all slots
// Leave 'value' empty to see current value
// LOL class can equal to 10, so we can play as Civilian
sm_tf2aim_cookie <#userid|pname|name> [class] [slot] [value]
Known issues:
* Issues with custom hats visibility
* Demoshield won't work as it should
To do:
* Admin command to add item
Changelogs:
Code:
1.5.1h:
	* Updated GetMaxHealth SDKCall
1.5.1g:
	* ????
1.5.1f:
	* Triggered build without attachables
1.5.1e:
	* Renamed forward to TF2AIM_OnGiveCustomItem
	* Added untested/unstable TFDodgeball support
	* Added some references
1.5.1d:
	* Fixed giving some weapons
1.5.1c:
	* Fixed work with remembering/forgetting replaced items
	* Fixed back problem with quality 0
	* Different notifications for normal and non-normal items
	* Updated translations (1 phrase removed, 2 added)
	* Reloading plugin is safe now
	* Added TF2AIM_TriggerUpdate native
	* Added TF2AIM_GetEquipedItemID native
	* Fixed other minor bugs and issues
1.5.1b:
	* Fixed the <s>goddamn</s> updaters timer
	* Fixed other minor bugs and issues
1.5.1a:
	* Fixed reversed messages about wrenchs / robot arms
	* (Untested) Fixed updater no works after map changing
1.5.1:
	* Added translations (English, Russian)
	* Added ability to set expire date (update DB with <small>ALTER TABLE `global_items` ADD `expdate` INT(32) NULL DEFAULT '0' AFTER `event`;</small>)
	* Fixed slowing on first spawning (precaching all players custom items, not currently used)
	* Edited description for TF2AIM_CustomItemEquiped in include file
1.5.0h:
	* Fixed replacing normal non-melee weapons
	* Fixed hiding wearable items on spawn
1.5.0g:
	* Edited function locks: autounlocks after 2 sec. (may meleeOnly bug is fixed now)
	* Added CustomItemEquiped forward
	* Reduced MaxHealth regeneration time from 0.5s to 0.3s
	* Fixed late item level changing for wearable items
1.5.0f:
	* Fixed tested replacing model for slot PDA
	* Added ConVar sm_tf2aim_debug
1.5.0e:
	* sm_tf2aim_meleeonly auto enables on maps if info_player_deathmatch entity found
	* Not a full health issue fixed
	* Added remover for previous custom wearable item on giving new one
1.5.0d:
	* Fixed giving weapons when Randomizer enabled, tf2aim disabled, and medieval enabled
	* tf2autoitems.cfg no longer uses
1.5.0c:
	* Fixed giving weapons
1.5.0b:
	* Updated item list
1.5.0a:
	* Fixed fail with items on Event_PlayerUpdateItems
	* Fixed fail with already-replaced-items
1.5.0:
	* DB is totally redesigned (now we have <b>`player_item`</b> and <b>`global_item`</b>)
	* Fixed memory leaking by precaching unused models
	* Added cookie support for slots <b>PDA</b> and <b>PDA2</b>
	* <b>VisWeps</b> is now fully required, but <b>Autoupdater</b> still is an optional extra.
	* Added option <b>Reset All</b> in <b>myitems</b> menu
	* Added <b>sm_tf2aim_cookie</b> server command (<small>Usage: sm_tf2aim_cookie &lt;target&gt; [class] [slot] [value]</small>)
	* Updated <b>TF2AIM_AddItem</b> native.
1.4.9b:
	* Moved constants to include file
	* Another MeleeMode fix (removing weapons with TF2_RemoveWeaponSlot)
1.4.9a:
	* Another MeleeMode fix (removing 'visible weapons')
	* Fixed undefined function if autoupdater and/or visweapons isn't included
1.4.9:
	* Another minor MeleeMode fix
1.4.8:
	* Added little delay for <b>post_inventory_application</b> event
1.4.7:
	* Added ConVar <b>sm_tf2aim_active</b> to enable/disable giving custom items
1.4.6:
	* Fixed restrict building (by locking <b>build</b> command)
1.4.5:
	* Added <b>sm_tf2aim_meleeonly</b> ConVar
1.4.5:
	* Only on Valentine's day: all hats with circling heart effect
1.4.4:
	* Added autoupdater
1.4.3:
	* Fixed memory leak on new round
1.4.2:
	* Fixed updatind foundmethod if weapons changed (not given) by tf2items
	* Updated code to work with weapons with custom weapon models
	* Another way to fix work with official wearable items
	* Added sdk functions (so gamedata named "tf2autoitems" required now)
	* Now you can create wearable items (with custom models too)
	* Added preventing multiupdating overflow
	* Preventing giving primary and secondary weapons on sudden death
1.4.1:
	* Added ability to change models
	* Added new column in SQL table (SQL: <small><u>ALTER TABLE `items` ADD `model` VARCHAR(768) CHARACTER SET utf8 COLLATE utf8_general_ci NULL AFTER `wepclass`;</u></small>)
1.4.0:
	* Replaced Query functions with Threading query functions
1.3.9b:
	* Added preventing from giving/replacing hats by non-root administrators
1.3.9a:
	* Added console command <b>myitems</b>, chat command <b>/myitems</b>
1.3.9:
	* Fixed minor bugs that I can't remember now
1.3.8:
	* Another slots fix with TF's rule: primary, secondary, melee, pda, pda2, hat, misc, action.
	* Fixed giving items if you're uses items with 0 quality
	* Added little notify if wrench/robot_arm was given, not replaced
1.3.7:
	* Added Golden wrench announcements
	* Fixed minor bug with version cvar
1.3.6:
	* Fixed another freakin' bugs with wearable items
1.3.5:
	* Fixed minor bugs with wearable items
1.3.4:
	* Fixed bug with multiple wearable items
	* Second choosing item will disable him
1.3.3:
	* Slot 5 is now unused (cuz' you can't spawn/replace action item)
	* Rewrited ability to give a hat, but more in Known issues
	* Added class 0 which allows to give items to all classes
	* DB and KetyValues renamed to `items`
1.3.2:
	* Now can show new and equiped items in menu
	* Fixed bug with cookies with 3, 4, 5 slots
1.3.1:
	* Untested ability to change wearable items
	* Fixed max slots
1.3.0:
	* Removed field `ammo` (not really needed)
	* Added TF2AutoItems_AddItem native
1.2.1:
	* Added new db field `title2` which shown in menu
1.2.0:
	* Added TF2Items_OnGiveNamedItem function to change (not giving new) weapon
1.1.0:
	* Added "found item" message
1.0.1:
	* Fixed weapons visibility
1.0.0:
	* Initial release
Attached Files
File Type: zip tf2aim_1.5.1h.zip (1.78 MB, 1065 views)
__________________

Last edited by Leonardo; 05-05-2019 at 01:56. Reason: added changelogs
Leonardo is offline
Thrawn2
Veteran Member
Join Date: Apr 2009
Old 12-21-2010 , 06:32   Re: [TF2] Auto Items Manager
Reply With Quote #2

nice.

a few quick questions:
how do you configure the weapons? phpmyadmin? what columns are the attribute values?
shouldn't [weapon 1 ---- 1 steamid] rather be [weapon 1 ----- n steamid]?

also i would rather like to see a db layout a little like this:
Code:
attributes (import from items.game.txt)
---------
id
name
translationcode
type ('positive', 'negative', 'neutral')
format ('value_is_additive', 'value_is_additive_percentage', 'value_is_date',...)

weapons
----------
id
name
wepclass
level
defindex
quality
slot
(accessflag)

weapons_attribute_relations
----------
(id)
weaponid
attributeid
value

weapons_class_relations
----------
(id)
weaponid
plrclass (0-8)


weapons_steamid_relations
-----------
(id)
weaponid
steamid
__________________
einmal mit profis arbeiten. einmal.

Last edited by Thrawn2; 12-21-2010 at 06:38.
Thrawn2 is offline
Leonardo
Veteran Member
Join Date: Feb 2010
Location: 90's
Old 12-21-2010 , 07:12   Re: [TF2] Auto Items Manager
Reply With Quote #3

example queries are now here

attribute syntax: AttribID|Value; AttribID as positive integer, Value as float or integer

also, I think it would be better to separate fields AttribID and Value.
if somebody agree, tell me that here.

ps: [AAA] Thrawn, one weapon per steamid in row. it's my feature to make upgrade sysem via web-site.
__________________

Last edited by Leonardo; 03-10-2011 at 00:53.
Leonardo is offline
FlaminSarge
Veteran Member
Join Date: Jul 2010
Old 12-21-2010 , 13:59   Re: [TF2] Auto Items Manager
Reply With Quote #4

Leonardo, you know that the TF2Items Give Weapon plugin has natives so you don't have to do the extensive loops, or actual weapon creation, right?

TF2Items_GiveWeapon(client, weaponIndex);
TF2Items_CreateWeapon(desiredIndex, const String:classname[], weaponIndex, weaponSlot, weaponQuality, weaponLevel, const String:weaponAttribs[], boolverwrite=false);

It manages them all under visibleweapons too.

So in post_inventory_application, you can call each of these instead of setting new stuff every time.

You can set the SQL to create certain items on plugin start, then give on post_inventory_application if need be.
__________________
Bread EOTL GunMettle Invasion Jungle Inferno 64-bit will break everything. Don't even ask.

All plugins: Randomizer/GiveWeapon, ModelManager, etc.
Post in plugin threads with questions.
Steam is for playing games.
You will be fed to javalia otherwise.
Psyduck likes replays.
FlaminSarge is offline
Leonardo
Veteran Member
Join Date: Feb 2010
Location: 90's
Old 12-21-2010 , 14:09   Re: [TF2] Auto Items Manager
Reply With Quote #5

uh. I didn't know. or didn't want to knew.

Last edited by Leonardo; 03-05-2011 at 06:14.
Leonardo is offline
Leonardo
Veteran Member
Join Date: Feb 2010
Location: 90's
Old 02-12-2011 , 20:04   Re: [TF2] Auto Items Manager (1.4.4)
Reply With Quote #6

Updated to 1.4.4;
so now Plugin AutoUpdater compatible.
more changes in changelog

also
changed TF2AIM_AddItem() native
here's an example of usage
PHP Code:
// giving the brass beast
new Handle:hData CreateDataPack();
GetClientAuthString(iVictimsClientAuthsizeof(sClientAuth));
WritePackString(hData"STEAM_0:1:23456789");
WritePackCell(hData0); // found method
WritePackCell(hData312); // definition index
WritePackCell(hData6); // quality
WritePackCell(hDataGetRandomInt(1,100)); // level
WritePackCell(hData0); // override attributes
TF2AIM_AddItem(hData);
CloseHandle(hData);

// giving khopesh climber
new Handle:hData CreateDataPack();
GetClientAuthString(iVictimsClientAuthsizeof(sClientAuth));
WritePackString(hData"STEAM_0:1:123456789");
WritePackCell(hData8); // found method
WritePackCell(hData171); // definition index
WritePackCell(hData10); // quality
WritePackCell(hData, -117); // level
WritePackCell(hData1); // override attributes
WritePackString(hData"1|0.9"); // attribute 1
WritePackString(hData"5|1.95"); // attribute 2
WritePackString(hData"149|4"); // attribute 3
TF2AIM_AddItem(hData);
CloseHandle(hData); 

Last edited by Leonardo; 03-07-2011 at 09:14. Reason: Updated for version 1.5.0
Leonardo is offline
FlaminSarge
Veteran Member
Join Date: Jul 2010
Old 02-13-2011 , 17:53   Re: [TF2] Auto Items Manager (v1.4.4, 2011-02-13)
Reply With Quote #7

Now you need the khopesh climber effect, not just the model
__________________
Bread EOTL GunMettle Invasion Jungle Inferno 64-bit will break everything. Don't even ask.

All plugins: Randomizer/GiveWeapon, ModelManager, etc.
Post in plugin threads with questions.
Steam is for playing games.
You will be fed to javalia otherwise.
Psyduck likes replays.
FlaminSarge is offline
Leonardo
Veteran Member
Join Date: Feb 2010
Location: 90's
Old 02-14-2011 , 00:20   Custom Weapons & Hats
Reply With Quote #8

Khopesh Climber
Details: climb that freakin' wall
Download: cw_khopesh_climber.smx
Source: cw_khopesh_climber.sp
Models: here
Code:
INSERT INTO `global_items` VALUES (3003, 2, 171, 2, -117, 'tf_weapon_club', 0, 'Khopesh Climber', 'models/advancedweaponiser/w_sickle_sniper.mdl', 0, '1|0.9', '5|1.95', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL);
Rebel's Curse
Download: cw_rebels_curse.smx
Source: cw_rebels_curse.sp
Models: here
Code:
INSERT INTO `global_items` VALUES (3004, 256, 197, 2, -115, 'tf_weapon_wrench', 0, 'Rebel''s Curse', 'models/custom/weapons/rebelscurse/c_wrench.mdl', 0, '156|1', '2|1.05', '107|1.1', '62|0.9', '64|0.9', '125|-10', '5|1.2', '81|0.75', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL);
Ban-Hammer
Details: Can ban enemies by one-hit-kill. It's a pyroman's weapon.
Also can control ban duration time via bamhammer_duration ConVar.
Set ConVar to -1 to kick players.
Download: here (all inside)
(original models)

Tranquilizer Gun
Details: Slowdown enemies by shooting.
Download: here (all inside)
(original textures)

Crowbar
Details: Be a Gordon Freeman!
Download: here (w/o fastdl)
(original textures)

Jar of Ants
Details: here
Download: cw_antjar.smx
Source: cw_antjar.sp
Code:
INSERT INTO `global_items` VALUES (3006, 2, 58, 1, -6, 'tf_weapon_jar', 0, 'Jar of Ants', NULL, 0, '149|10', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL);

Last edited by Leonardo; 08-18-2011 at 04:57. Reason: updated with TF2AIM v1.5.0
Leonardo is offline
snowyiet
Member
Join Date: Jan 2010
Old 03-05-2011 , 02:30   Re: [TF2] Auto Items Manager (v1.4.9b, 2011-02-27)
Reply With Quote #9

It doesn't unequip a manager item if you unequip it while having a official unlock equipped.
snowyiet is offline
Leonardo
Veteran Member
Join Date: Feb 2010
Location: 90's
Old 03-05-2011 , 06:14   Re: [TF2] Auto Items Manager (v1.4.9b, 2011-02-27)
Reply With Quote #10

but can't do anything with it

also
1.5.0 is coming soon
with new DB structure
Leonardo is offline
Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT -4. The time now is 01:14.


Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.
Theme made by Freecode