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

[TF2Items] Give Weapon (v3.14159, 11/29/2013)


Post New Thread Reply   
 
Thread Tools Display Modes
FlaminSarge
Veteran Member
Join Date: Jul 2010
Old 03-13-2013 , 04:38   Re: [TF2Items] Give Weapon (v3.14, 01/23/2013)
Reply With Quote #1031

Ap-Sap won't spawn because of sapper-handling code that hasn't been extended to it yet. Ham Shank is 1013 and should be fine as long as you have TF2ItemsInfo installed.
__________________
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
Bitl
Senior Member
Join Date: Jul 2012
Old 03-13-2013 , 05:41   Re: [TF2Items] Give Weapon (v3.14, 01/23/2013)
Reply With Quote #1032

Quote:
Originally Posted by FlaminSarge View Post
Ap-Sap won't spawn because of sapper-handling code that hasn't been extended to it yet. Ham Shank is 1013 and should be fine as long as you have TF2ItemsInfo installed.
Just went ahead and added the Ap-Sap.

Modified version below.

EDIT: Added checks for TF2ItemsInfo.

Code:
if (idx == 735 || idx == 736 || idx == 810 || idx == 831 || idx == 933)
Code:
if (iItemDefID == 735 || iItemDefID == 736 || iItemDefID == 810 ||iItemDefID == 831 ||iItemDefID == 933) iItemSlot = 1;
Attached Files
File Type: sp Get Plugin or Get Source (tf2items_giveweapon.sp - 161 views - 231.8 KB)
File Type: smx tf2items_giveweapon.smx (70.1 KB, 167 views)
__________________
My Plugins
Modified Plugins:
Building Spawner
Monster
It's Raining Men!
Tutorials:
Custom Gamemode

I DON'T DO PLUGIN REQUESTS.

Last edited by Bitl; 03-13-2013 at 13:37.
Bitl is offline
FlaminSarge
Veteran Member
Join Date: Jul 2010
Old 03-13-2013 , 09:34   Re: [TF2Items] Give Weapon (v3.14, 01/23/2013)
Reply With Quote #1033

You forgot about the TF2ItemsInfo integration part of it
" if (iItemDefID == 735 || iItemDefID == 736 || iItemDefID == 810 ||iItemDefID == 831) iItemSlot = 1;"
needs to have 933 in there as well, though I added a tf_weapon_sapper check instead.
I'm tempted to make all sappers use tf_weapon_sapper just for differentiation, because Valve updated it so that tf_weapon_sapper works properly for index 735 (instead of glitching out the viewmodel).
__________________
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
Bitl
Senior Member
Join Date: Jul 2012
Old 03-13-2013 , 13:39   Re: [TF2Items] Give Weapon (v3.14, 01/23/2013)
Reply With Quote #1034

Quote:
Originally Posted by FlaminSarge View Post
You forgot about the TF2ItemsInfo integration part of it
" if (iItemDefID == 735 || iItemDefID == 736 || iItemDefID == 810 ||iItemDefID == 831) iItemSlot = 1;"
needs to have 933 in there as well, though I added a tf_weapon_sapper check instead.
I'm tempted to make all sappers use tf_weapon_sapper just for differentiation, because Valve updated it so that tf_weapon_sapper works properly for index 735 (instead of glitching out the viewmodel).
Just added the checks.
__________________
My Plugins
Modified Plugins:
Building Spawner
Monster
It's Raining Men!
Tutorials:
Custom Gamemode

I DON'T DO PLUGIN REQUESTS.
Bitl is offline
Mr. Man
Veteran Member
Join Date: Mar 2011
Location: Huh?
Old 03-18-2013 , 11:25   Re: [TF2Items] Give Weapon (v3.14, 01/23/2013)
Reply With Quote #1035

Is there a way to permanently turn off custom weapons? tf2items_customweapons_lowadmins 0 and tf2items_valveweapons 0 doesn't appear to work since they're still able to give themselves such.

Last edited by Mr. Man; 03-18-2013 at 11:26.
Mr. Man is offline
FlaminSarge
Veteran Member
Join Date: Jul 2010
Old 03-19-2013 , 00:41   Re: [TF2Items] Give Weapon (v3.14, 01/23/2013)
Reply With Quote #1036

With the upcoming TF2Attributes-based update, I can move a lot of the custom weapons out to the custom config file and use some of the unused attributes to mark them as custom (e.g. the Khopesh Climber). As such, that may not be necessary as I'll just include a tf2items.givecustom.txt file with the custom weapons in it and you can clear them as such. Alternatively, I can include a "disable" key that you can put in the custom config, and when the config is read, any of the custom indices that have the "disable" key will be disabled (example below). I was going to try an admin flag, but managing multiple groups/flags/permissions seems like a pain.
Code:
{
   "2171"
   {
      "disable" "1"
   }
}
__________________
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.

Last edited by FlaminSarge; 03-19-2013 at 00:42.
FlaminSarge is offline
mrcodxd
Junior Member
Join Date: Aug 2012
Old 03-20-2013 , 14:51   Re: [TF2Items] Give Weapon (v3.14, 01/23/2013)
Reply With Quote #1037

this is probably a dumb question, but is it possible to give a weapon without it disappearing when touching a locker?
also: I don't rlly understand resetex, can you explain it a bit?
thx
mrcodxd is offline
MasterOfTheXP
Veteran Member
Join Date: Aug 2011
Location: Cloudbank
Old 03-20-2013 , 15:04   Re: [TF2Items] Give Weapon (v3.14, 01/23/2013)
Reply With Quote #1038

Quote:
Originally Posted by mrcodxd View Post
this is probably a dumb question, but is it possible to give a weapon without it disappearing when touching a locker?
also: I don't rlly understand resetex, can you explain it a bit?
thx
sm_givew_ex gives permanent weapons that are always given after respawn/resupply/class change/you name it. (Not disconnect though). "sm_givew_ex target weaponid 1" to give it immediately and permanently.

sm_resetex undoes permanent weapons, but not immediately. They won't get the weapon anymore after resupplying.
__________________
Plugins / My Steam / TF2 Sandbox (plugin beta testing!)
MasterOfTheXP is offline
404UserNotFound
BANNED
Join Date: Dec 2011
Old 03-21-2013 , 16:27   Re: [TF2Items] Give Weapon (v3.14, 01/23/2013)
Reply With Quote #1039

Quote:
Originally Posted by FlaminSarge View Post
With the upcoming TF2Attributes-based update, I can move a lot of the custom weapons out to the custom config file and use some of the unused attributes to mark them as custom (e.g. the Khopesh Climber). As such, that may not be necessary as I'll just include a tf2items.givecustom.txt file with the custom weapons in it and you can clear them as such. Alternatively, I can include a "disable" key that you can put in the custom config, and when the config is read, any of the custom indices that have the "disable" key will be disabled (example below). I was going to try an admin flag, but managing multiple groups/flags/permissions seems like a pain.
Code:
{
   "2171"
   {
      "disable" "1"
   }
}
With this new addition....would it be possible to take the custom attribute coding from Advanced Weaponiser 2 and do some quick recodes and make it work with this plugin?

Because I'd love to mess around with both plugins and see if I can convert some things over from AW2. I looked into the TF2Attributes thing, and noticed how it checks for named attributes, and I figured "Hey, maybe I could come up with something that would give names to the custom attributes, and then have the GW plugin detect those named attributes!"

Looking forward to the new update to the plugin though
404UserNotFound is offline
FlaminSarge
Veteran Member
Join Date: Jul 2010
Old 03-21-2013 , 22:32   Re: [TF2Items] Give Weapon (v3.14, 01/23/2013)
Reply With Quote #1040

I meant unused attributes, since those are nice markers. You could probably add attributes by just adding new entries in items_game, after which you can check for them existing on an entity via GetAttribute.
__________________
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
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 10:32.


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