Some questions related to GAMEMODE.BaseClass and hooks.

  1. Does GAMEMODE.BaseClass include ALL the available gamemode hooks in GMod?
  2. Are ALL the available gamemode hooks specified in the base gamemode?
  3. How can I check if a string equals a valid gamemode hook name in gmod, if the above questions are false?

I’ve been writing lua for 2 years now and this are one of the few things which I still don’t understand.



By the way, please make sure that your answer to these questions are 100% correct or I might spend hours coding something which won’t work fully after all.

Snip for stupidity.

  1. GAMEMODE.BaseClass refers to the gamemode your gamemode is derived from.
  2. Most likely. When you open the base gamemode files, you can see a bunch of empty functions. You’ll have to go through the files and check with the wiki.

Wouldn’t work for GM:PlayerSpawn() etc.

Yea, I wasn’t thinking straight. That would only worked if the gamemode function had a hook, disregard that post.