View Single Post
Author Message
spidershift
Member
Join Date: Oct 2014
Old 10-21-2014 , 13:13   Hooking BaseEntity Functions in CSGO
Reply With Quote #1

Hello, I'm new to MM:S and have been reading almost everything I can find over the past 3-4 days, but haven't been really getting anywhere. I've been trying for the life of me to hook a few things in BaseEntity and cannot get my plugin to compile at all.

I'm trying to start with the following:

PHP Code:
SH_DECL_HOOK1_void(CBaseEntityFireBulletsSH_NOATTRIB0, const FireBulletsInfo_t &); 
And I can't even get that one basic thing to compile, because I can't figure out what includes I require. I've tried including baseentity.h without any luck, so I must have some kind of misunderstanding of how to make this work. None of the errors being reported by VS2013 are of any help, and just like to complain about the syntax, such as suggesting that that line needs a type identifier.

After finding out on the first day that the standard MM:S download doesn't even include a CSGO option in the sample and stub, and finding the one on GitHub, I was finally able to get the stub to compile with CSGO, but that's about as far as I've gotten.

All the example plugins I find are only using basic ServerGame hooks and don't require any special includes. Plus most of the plugins I find to look at the source code to gain a better understanding of things are usually all obsolete and have broken links. It's becoming quite difficult to get started with all this, so I was hoping someone could help me understand what I'm supposed to do to hook the functions in the BaseEntity class or certain classes that derive from it. Any help is greatly appreciated. Thanks.
spidershift is offline