Getting LocalPlayer in binary module

Hey guys, I’m lost on this one, basically I would like to somehow get my LocalPlayer object for use in my module, I imagine there is no C++ equilivent to LocalPlayer() which makes it a little tricky, I also want to avoid using the Source SDK headers as my bandwidth is horrible where I am.

I was thinking maybe somehow finding my localplayer object’s address but I don’t know how to go about doing this, maybe I can scan for my health, armor, etc and compare the offsets? confused

Any ideas?

Look into this http://wiki.garrysmod.com/page/C_Lua:_Functions

I didn’t really find that much useful though I decided to look into doing it via Lua.

After doing a quick search I was able to find this: http://www.lua.org/notes/ltn005.html

This seems like the perfect example. As soon as I get on my PC I’m going to try and call LocalPlayer() and get the table it returns and see if that brings me any closer, i’m doing this for purely educational purposes so I really don’t have much experience in this Q.Q