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.
-
03-01-2017, 11:49 PM161Posts463ReputationMay 2014NextGenUpdate
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. -
03-02-2017, 12:13 AM4,467Posts119,383ReputationSep 2012NextGenUpdateOkay, 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)
-
The Following User Thanked SC58 For This Useful Post:
-
03-02-2017, 12:57 AM161Posts463ReputationMay 2014NextGenUpdatehook 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)
Okay, Thank you!
Thread can be closed, I got the help I needed <3