View Single Post
NgBUCKWANGS
Senior Member
Join Date: Dec 2014
Old 09-29-2017 , 08:05   Re: L4D2, How to Get Reserve Ammo Without m_hOwnerEntity?
Reply With Quote #5

Quote:
Originally Posted by Powerlord View Post
Actually, are you sure the entities for the weapons on the floor are the same entities when a player is carrying them? I don't have L4D datamap and netprop dumps to check.
Not 100% but I did as a last hack resort kind of thing, scripted in OnPlayerRunCmd that when ever I looked at a weapon, I'd get a bot to immediately use that weapon. I did only check to see if their original item changed and if so, I'd get them to use it again. Now while they were actually holding the weapon in question, I tried getting the reserve and that was unreliable. I tried quite a few things and it gotten pretty ridiculous.

For those googling and curious, you'd get dumps of most stuff (e.g., datamaps, netprops) with
PHP Code:
"sm_dump_admcache"
 
Dumps the admin cache for debugging
"sm_dump_classes"
 
Dumps the class list as a text file
"sm_dump_datamaps"
 
Dumps the data map list as a text file
"sm_dump_handles"
 
Dumps Handle usage to a file for finding Handle leaks
"sm_dump_netprops"
 
Dumps the networkable property table as a text file
"sm_dump_netprops_xml"
 
Dumps the networkable property table as an XML file
"sm_dump_teprops"
 
Dumps tempentity props to a file 
Yesterday, I kept at it for a while and couldn't reliably within the same frame get the reserve of a weapon just laying on the ground without moving it (I know it has ammo, I put it there). My attempts would sometimes work but most of the time they won't. All my methods were in the end just completely unreliable. As far as what I'm working on, I don't technically need to even do this but it's a problem I'm really curious about and I'm fascinated by it.

I mean, even if it's the client that has that information, why can't I as a client get it without moving the weapon? If I make any progress on this, I'll report back. Thanks fellas
NgBUCKWANGS is offline