Raised This Month: $32 Target: $400
 8% 

[TF2] TF2Attributes (v1.7.2, 2022/09/18)


Post New Thread Reply   
 
Thread Tools Display Modes
FlaminSarge
Veteran Member
Join Date: Jul 2010
Old 02-02-2014 , 02:08   Re: [TF2] TF2Attributes (v1.1.1, 08/27/2013)
Reply With Quote #181

Will look into it.
__________________
Bread EOTL GunMettle Invasion Jungle Inferno 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
CoolJosh3k
AlliedModders Donor
Join Date: Mar 2010
Old 03-11-2014 , 17:00   Re: [TF2] TF2Attributes (v1.1.1, 08/27/2013)
Reply With Quote #182

Sorry if this feels like more annoying nagging, but I too have:


Code:
L 03/11/2014 - 20:00:58: [SM] Plugin encountered error 25: Call was aborted
L 03/11/2014 - 20:00:58: [SM] Native "SetFailState" reported: Could not initialize call to CEconItemSchema::GetAttributeDefinitionByName
L 03/11/2014 - 20:00:58: [SM] Displaying call stack trace for plugin "tf2attributes.smx":
L 03/11/2014 - 20:00:58: [SM]   [0]  Line 107, /home/groups/alliedmodders/forums/files/8/4/3/0/4/116848.attach::OnPluginStart()
In the meantime, can you provide a link for giving donations? I feel like you deserve something for your hard work so far.

Last edited by CoolJosh3k; 03-11-2014 at 17:00.
CoolJosh3k is offline
FlaminSarge
Veteran Member
Join Date: Jul 2010
Old 03-15-2014 , 03:51   Re: [TF2] TF2Attributes (v1.1.1, 08/27/2013)
Reply With Quote #183

It doesn't look like any of the sigs have changed on Win/Lin.
Everything's still working for me on Windows, and I've asked somebody with Linux to let me know whether it works for them. I've made sure that the gamedata in the OP (tf2.attributes.txt) is the same as what I've got on my server...
You sure you've got everything up to date?
__________________
Bread EOTL GunMettle Invasion Jungle Inferno 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
CoolJosh3k
AlliedModders Donor
Join Date: Mar 2010
Old 03-17-2014 , 05:30   Re: [TF2] TF2Attributes (v1.1.1, 08/27/2013)
Reply With Quote #184

I will try a fresh install with all up-to-date stuff and what happens.

Update:

I now feel rather silly, but also relieved. Here is what I have now, with everything up-to-date and no error(s):

Code:
] meta version
Metamod:Source version 1.10.1-dev
Build ID: 882:5605b95026b8-dev
Loaded As: Valve Server Plugin
Compiled on: Mar  3 2014
Plugin interface version: 15:14
SourceHook version: 5:5
http://www.metamodsource.net/
] sm version
 SourceMod Version Information:
    SourceMod Version: 1.5.3-dev+4006
    SourcePawn Engine: SourcePawn 1.1, jit-x86 (build 1.5.3-dev+4006)
    SourcePawn API: v1 = 4, v2 = 4
    Compiled on: Mar  5 2014 09:51:03
    Build ID: 4006:7928ab66ecd5
    http://www.sourcemod.net/
] sm plugins list
[SM] Listing 26 plugins:
  01 "Admin File Reader" (1.5.3-dev+4006) by AlliedModders LLC
  02 "Admin Help" (1.5.3-dev+4006) by AlliedModders LLC
  03 "Admin Menu" (1.5.3-dev+4006) by AlliedModders LLC
  04 <Error> "Advertisements" (0.6) by Tsunami
  05 "Anti-Flood" (1.5.3-dev+4006) by AlliedModders LLC
  06 "Basic Ban Commands" (1.5.3-dev+4006) by AlliedModders LLC
  07 "Basic Chat" (1.5.3-dev+4006) by AlliedModders LLC
  08 "Basic Comm Control" (1.5.3-dev+4006) by AlliedModders LLC
  09 "Basic Commands" (1.5.3-dev+4006) by AlliedModders LLC
  10 "Basic Info Triggers" (1.5.3-dev+4006) by AlliedModders LLC
  11 "Basic Votes" (1.5.3-dev+4006) by AlliedModders LLC
  12 "Client Preferences" (1.5.3-dev+4006) by AlliedModders LLC
  13 "Fun Commands" (1.5.3-dev+4006) by AlliedModders LLC
  14 "Fun Votes" (1.5.3-dev+4006) by AlliedModders LLC
  15 "MapChooser" (1.5.2-dev+3930) by AlliedModders LLC
  16 "Nextmap" (1.5.3-dev+4006) by AlliedModders LLC
  17 "Map Nominations" (1.5.2-dev+3930) by AlliedModders LLC
  18 "Player Commands" (1.5.3-dev+4006) by AlliedModders LLC
  19 "Reserved Slots" (1.5.3-dev+4006) by AlliedModders LLC
  20 "Sound Commands" (1.5.3-dev+4006) by AlliedModders LLC
  21 "Star_ item tweaks" (0.2.1) by Trotim, CoolJosh3k
  22 "TF2 Set Class" (1.2.2) by Tylerst
  23 "[TF2] TF2Attributes" (1.1.1) by FlaminSarge
  24 "[DEV] TF2ItemsInfo" (1.8.17.7-20131121) by Leonardo
  25 "[TF2Items] Give Weapon" (3.14159) by FlaminSarge (orig by asherkin)
  26 "[TF2Items] Manager" (1.4.1) by Damizean & Asherkin
Load Errors:
Advertisements: File Not Found: addons\sourcemod\configs\advertisements.txt
] sm exts list
[SM] Displaying 10 extensions:
[01] Automatic Updater (1.5.3-dev+4006): Updates SourceMod gamedata files
[02] Webternet (1.5.3-dev+4006): Extension for interacting with URLs
[03] TF2Items (1.5.3): TF2 Item Modifier
[04] TF2 Tools (1.5.3-dev+4006): TF2 extended functionality
[05] BinTools (1.5.3-dev+4006): Low-level C/C++ Calling API
[06] SDK Hooks (1.5.3-dev+4006): Source SDK Hooks
[07] Top Menus (1.5.3-dev+4006): Creates sorted nested menus
[08] SDK Tools (1.5.3-dev+4006): Source SDK Tools
[09] Client Preferences (1.5.3-dev+4006): Saves client preference settings
[10] SQLite (1.5.3-dev+4006): SQLite Driver

Last edited by CoolJosh3k; 03-17-2014 at 08:15.
CoolJosh3k is offline
xerox_i_
Member
Join Date: Mar 2013
Old 04-01-2014 , 08:28   Re: [TF2] TF2Attributes (v1.1.1, 08/27/2013)
Reply With Quote #185

FlaminSarge how i can apply attributes on weapons trough the code? i'm trying but getting "undefined symbol" on tf_weapon_scattergun

Code:
TF2Attrib_SetByDefIndex(tf_weapon_scattergun, 2, 2.0);
__________________
~SirXeroX

-BPC Gaming!

Last edited by xerox_i_; 04-01-2014 at 09:51.
xerox_i_ is offline
Dr. McKay
Sir Dr. SourceMod Plugin Approver Esq. Ltd. M.D. PhD
Join Date: Aug 2011
Location: Atlantis
Old 04-01-2014 , 13:27   Re: [TF2] TF2Attributes (v1.1.1, 08/27/2013)
Reply With Quote #186

Quote:
Originally Posted by xerox_i_ View Post
FlaminSarge how i can apply attributes on weapons trough the code? i'm trying but getting "undefined symbol" on tf_weapon_scattergun

Code:
TF2Attrib_SetByDefIndex(tf_weapon_scattergun, 2, 2.0);
Quotes.

TF2Attrib_SetByDefIndex("tf_weapon_scattergun", 2, 2.0);
__________________
Dr. McKay is offline
Powerlord
AlliedModders Donor
Join Date: Jun 2008
Location: Seduce Me!
Old 04-01-2014 , 13:46   Re: [TF2] TF2Attributes (v1.1.1, 08/27/2013)
Reply With Quote #187

Quote:
Originally Posted by xerox_i_ View Post
FlaminSarge how i can apply attributes on weapons trough the code? i'm trying but getting "undefined symbol" on tf_weapon_scattergun

Code:
TF2Attrib_SetByDefIndex(tf_weapon_scattergun, 2, 2.0);
TF2Attrib works on entity indexes, not classnames.

You can find these using GetPlayerWeaponSlot. tf2_stocks even has some friendly names for those (such as TFWeaponSlot_Primary). Having said that, the weapon slot names are useless past TFWeaponSlot_Melee as they have no relation to what the slots actually represent.

It's recommended that you change items around in an event handler for the post_inventory_application event, as that's the event that gets called whenever players change inventory items.

Incidentally, TF2Items can also modify weapons and has a special callback to do it before the item is actually given to the player.

Quote:
Originally Posted by Dr. McKay View Post
Quotes.

TF2Attrib_SetByDefIndex("tf_weapon_scattergun", 2, 2.0);
Except that doesn't match the method signature, which is
Code:
native bool:TF2Attrib_SetByDefIndex(iEntity, iDefIndex, Float:flValue);
__________________
Not currently working on SourceMod plugin development.

Last edited by Powerlord; 04-01-2014 at 13:49.
Powerlord is offline
xerox_i_
Member
Join Date: Mar 2013
Old 04-02-2014 , 10:33   Re: [TF2] TF2Attributes (v1.1.1, 08/27/2013)
Reply With Quote #188

Quote:
Originally Posted by Dr. McKay View Post
Quotes.

TF2Attrib_SetByDefIndex("tf_weapon_scattergun", 2, 2.0);
i got error 035 "argument type mismatch <argument 1>"

and how i can print the weapon names into a menu?

example: if i'm using heavy print their 3 weapons into a menu
__________________
~SirXeroX

-BPC Gaming!

Last edited by xerox_i_; 04-02-2014 at 10:38.
xerox_i_ is offline
11530
Veteran Member
Join Date: Sep 2011
Location: Underworld
Old 04-02-2014 , 16:41   Re: [TF2] TF2Attributes (v1.1.1, 08/27/2013)
Reply With Quote #189

Quote:
Originally Posted by xerox_i_ View Post
i got error 035 "argument type mismatch <argument 1>"
You didn't read Powerlord's post above, did you?
__________________
11530 is offline
FlaminSarge
Veteran Member
Join Date: Jul 2010
Old 04-03-2014 , 00:59   Re: [TF2] TF2Attributes (v1.1.1, 08/27/2013)
Reply With Quote #190

Quote:
Originally Posted by Dr. McKay View Post
Quotes.

TF2Attrib_SetByDefIndex("tf_weapon_scattergun", 2, 2.0);
That was uncharacteristically mean...
__________________
Bread EOTL GunMettle Invasion Jungle Inferno 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
Reply


Thread Tools
Display Modes

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 22:33.


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