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

Retrieve ammo offsets


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
DJ Tsunami
DJ Post Spammer
Join Date: Feb 2008
Location: The Netherlands
Old 07-25-2008 , 16:31   Retrieve ammo offsets
Reply With Quote #1

In TF2, you can use FindSendPropInfo("CBasePlayer", "m_iAmmo") + 4 for the ammo offset of the primary weapon, + 8 for the secondary and + 12 for the third. But in DoD:S, each weapon has its own offset (+ 4 for weapon_colt, + 8 for weapon_p38, etc). I'm assuming this is the same for CS:S. How would I go about finding these offsets for CS:S, and is there possibly a way to find them programmatically, instead if hardcoding it in the plugin? That way my plugin wouldn't be mod dependent.
__________________
Advertisements | REST in Pawn - HTTP client for JSON REST APIs
Please do not PM me with questions. Post in the plugin thread.
DJ Tsunami is offline
bl4nk
SourceMod Developer
Join Date: Jul 2007
Old 07-25-2008 , 16:56   Re: Retrieve ammo offsets
Reply With Quote #2

I believe CS:S uses the same method that TF2 does.
bl4nk is offline
DJ Tsunami
DJ Post Spammer
Join Date: Feb 2008
Location: The Netherlands
Old 07-25-2008 , 17:04   Re: Retrieve ammo offsets
Reply With Quote #3

Oh. Well, my post still stands, I'm sure there's others that work like DoD:S (unless DoD:S really is an outcast), would be nice to have a mod independent plugin.
__________________
Advertisements | REST in Pawn - HTTP client for JSON REST APIs
Please do not PM me with questions. Post in the plugin thread.
DJ Tsunami is offline
teame06
i have a hat
Join Date: Feb 2005
Location: Hat City
Old 07-25-2008 , 20:31   Re: Retrieve ammo offsets
Reply With Quote #4

Just use hacks =p
__________________
No private support via Instant Message
GunGame:SM Released
teame06 is offline
Send a message via AIM to teame06
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:32.


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