Raised This Month: $ Target: $400
 0% 

[TF2] Gamedata: GetMaxAmmo / GetMaxClip


  
 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
Powerlord
AlliedModders Donor
Join Date: Jun 2008
Location: Seduce Me!
Old 06-08-2015 , 16:47   Re: [TF2] Accurately get a weapon's max clip/ammo.
Reply With Quote #6

Quote:
Originally Posted by Chdata View Post
What exactly does "GetEntProp" do to "figure it out"? I see it has a default value of 4 for the size, but I don't see anything like sizeof(int) or something.
Whoops, I missed this last month.

If you check a netprops / datamaps list, you'll notice that it includes the number of bits each thing takes up. That's because the SendProp class (which is what netprops are) stores this information1. I'm assuming the DataMap equivalent does as well.

1Unless it's a CUtlVector SendProp or one of its direct children. These are really a wrapper around a CUtlVector object on the server side and not an actual number/string property.
__________________
Not currently working on SourceMod plugin development.

Last edited by Powerlord; 06-08-2015 at 16:51.
Powerlord is offline
 



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


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