Thread
:
[TF2] Gamedata: GetMaxAmmo / GetMaxClip
View Single Post
Author
Message
Chdata
Veteran Member
Join Date: Aug 2012
Location: Computer Chair, Illinois
05-10-2015 , 11:38 [TF2] Gamedata: GetMaxAmmo / GetMaxClip
#
1
Useful for anyone modding weapons or anything related to them.
This should also work for weapons with custom attributes and custom spawned weapons.
Anyway, TF2 doesn't seem to have a netprop or datamap for a weapon's max clip/ammo, meaning you have to use an SDKCall to GetMaxAmmo / GetMaxClip1 to get it. Maybe there's hidden ones really, but yeah.
It also properly accounts for mult_clip_size. I believe it returns -1 for energy weapons though. m_iClip1 will be -1 for energy weapons anyway. (Such as the Cow Mangler).
I also threw in GetDefaultClip (whatever that is) and GetSlot.
And well... see the attached files!
Oh, I only set it up for Linux/Mac, because I'm lazy.
Attached Files
weapon.data.txt
(1,004 Bytes, 434 views)
weapondata.inc
(4.4 KB, 385 views)
__________________
Owner of
TF2Data
Donate
|
Steam
|
Speed ASM
My plugins:
Updated VSH 1.55
|
Plugin Threads
|
Github
Last edited by Chdata; 06-08-2015 at
11:21
.
Chdata
View Public Profile
Send a private message to Chdata
Visit Chdata's homepage!
Find More Posts by Chdata