Source Code GetPlayer function

Hexui Undetected CSGO Cheats Sinkicheat PUBG Cheat

Rawr123

Newbie
Silenced
Apr 23, 2016
4
787
0
Hiya GH, saw Rake's tutorial on how to Ida and after some reversing on my own a found a function that I haven't seen others use before, it isn't anything gamebreaking but I guess it could be a neat addition since you'd only have 1 address to keep track of for grabbing players (not like AC updates that often but you get my point).

Located at 0x427320 we have a function that gets a pointer to a player based on the index you feed it, here's a hex-rays decomp with some renaming.



And here's how to implement and use it.



And do this in your source file.



And we're done! First time I've attempted to contribute ever really so don't scorch me too much <3
 

metrix

0x90
Meme Tier VIP
Fleep Tier Donator
Trump Tier Donator
Oct 11, 2013
209
5,828
12
It's not object oriented. Only a class with static functions. Nothing object oriented on that.

Anyways I also like your founding. Cool dude. :)
 

mambda

headass
Escobar Tier VIP
Trump Tier Donator
Jun 25, 2014
2,294
37,938
269
Protip, instead of having to have your function typedef for getplayers outside the actual class, what you can instead do is keep it within the class and keep it private, then have a constructor for the class that takes an address, and does the type conversion for you, i personally think it looks cleaner
 

Rawr123

Newbie
Silenced
Apr 23, 2016
4
787
0
Protip, instead of having to have your function typedef for getplayers outside the actual class, what you can instead do is keep it within the class and keep it private, then have a constructor for the class that takes an address, and does the type conversion for you, i personally think it looks cleaner
Kind of the idea by making the class who handles players static is that instancing and initialization wouldn't be necessary. Thank you everyone for all the feedback and input in the thread, really happy to see people noticed me! ^^
 

mambda

headass
Escobar Tier VIP
Trump Tier Donator
Jun 25, 2014
2,294
37,938
269
Kind of the idea by making the class who handles players static is that instancing and initialization wouldn't be necessary. Thank you everyone for all the feedback and input in the thread, really happy to see people noticed me! ^^
Yeah, just my preference really, i'd have just made it a singleton. Cool stuff tho man
 
Attention! Before you post:

Read the How to Ask Questions Guide
99% of questions are answered in the Beginner's Guide, do it before asking a question.

No Hack Requests. Post in the correct section.  Search the forum first. Read the rules.

How to make a good post:

  • Fill out the form correctly
  • Tell us the game name & coding language
  • Post everything we need to know to help you
  • Ask specific questions, be descriptive
  • Post errors, line numbers & screenshots
  • Post code snippets using code tags
  • If it's a large project, zip it up and attach it

If you do not comply, your post may be deleted.  We want to help, please make a good post and we will do our best to help you.

Community Mods