View Single Post
Powerlord
AlliedModders Donor
Join Date: Jun 2008
Location: Seduce Me!
Old 04-13-2012 , 10:33   Re: finding adress by using cheat engine
Reply With Quote #8

Quote:
Originally Posted by GoD-Tony View Post
I found that they are part of the gamerules class, and are found here:
Code:
CCSGameRulesProxy:
 Sub-Class Table (1 Deep): DT_CSGameRulesProxy
  Sub-Class Table (2 Deep): DT_GameRulesProxy
  Sub-Class Table (2 Deep): DT_CSGameRules
  -Member: m_bFreezePeriod (offset 580) (type integer) (bits 1)
  -Member: m_iRoundTime (offset 584) (type integer) (bits 16)
  -Member: m_fRoundStartTime (offset 588) (type float) (bits 0)
  -Member: m_flGameStartTime (offset 592) (type float) (bits 0)
  -Member: m_iHostagesRemaining (offset 596) (type integer) (bits 4)
  -Member: m_bMapHasBombTarget (offset 600) (type integer) (bits 1)
  -Member: m_bMapHasRescueZone (offset 601) (type integer) (bits 1)
  -Member: m_bLogoMap (offset 602) (type integer) (bits 1)
  -Member: m_bBlackMarket (offset 603) (type integer) (bits 1)
Code:
m_iNumCTWins | offset 632 | m_iHostagesRemaining + 36
m_iNumTWins | offset 634 | m_iHostagesRemaining + 38
I think this information is correct. Is it possible to read/write to an arbitrary offset inside gamerules?
sm_dump_datamaps blah.txt will dump a file (blah.txt) with all the current entities on the server. I assume this includes a cs_gamerules entity for the CCSGameRulesProxy class, much like TF2 has tf_gamerules entity for the CTFGameRulesProxy class.

Presumably, you can use FindEntityByClassname and SetEntProp / GetEntProp to manipulate the team scores through it directly.

Interestingly, I can't find properties in the CTFGameRulesProxy class to read the current team scores, despite having inputs to add to them.
__________________
Not currently working on SourceMod plugin development.

Last edited by Powerlord; 04-13-2012 at 10:40.
Powerlord is offline