Originally posted by xPurpBoyyx
Okay, So I've been working on a SPRX for a pretty long time now. Trying to make it stable and more to my style. Functions use a bool for a True or False statement to know whether or not to make the command On or Off.
Well my issue is that they stay as "TRUE" and do not reset to "FALSE" on disconnect or game end. Does anyone know how to fix this? I've tried making a false statement for each bool when the menu is opened. It works but it's annoying, then I've tried with onPlayerSpawned. It works, but every time someone joins. It resets the bools and makes me lag. So, I ask if someone can help me make them reset on disconnect or game end.
hook G_InitGame and store all you stuff there as this function init the game like gentity, gclient and other shit on the start of the game when map is loading or map restart, this is what i use
0x18A2B8 - void G_InitGame(int levelTime, unsigned int randomSeed, int restart, int registerDvars, int savegame)