pushing the command once is not enough for no fog hack, when you respawn you will need to push the no fog hack again
Make a class for PTC and Memoryhacks and it will look like this:
Without any problems or laggCode:cNoRecoil.Init((void*)cMisc.dwAdrTbl[18], (void*)"\x90\x90\x90\x90"); cNoFog.Init("FogEnable 0", "FogEnable 1"); while(1) { cNoRecoil.Patch(cMenu.activatedHack[9], 4); cNoFog.patchConsoleCommand(cMenu.activatedHack[49]); }
Progress with my game - "Disbanded"
- Fixed FPS lag on spawning entities due to the ent_preload buffer!
- Edit the AI code to get some better pathfinding
- Fixed the view bug within the sniper scope view. The mirror entity is invisible now!
- Added a new silencer for ALL weapons. Also fixed the rotation bugs
- Added a ton of new weapons and the choice to choose a silencer for every weapon
- Created a simple AntiCheat, noobs will cry like hell xD
- The name will be Disbanded, the alpha starts on the 18th august 2014
Some new physics fun (Serversided, works on every client)
My new AI
https://www.youtube.com/watch?v=EMSB1GbBVl8
And for sure my 8 months old gameplay with 2 friends
https://www.youtube.com/watch?v=Na2kUdu4d_k
thanks to all, guys. fixed!
Don't know why you quoted me here lol
So really for that to work right we need to include in our while loop:
Code:if(PlayerIsDead){ imAboutToRespawn = true; } else{ if(imAboutToRespawn){ imAboutToRespawn = false; // player has already respawned because they're not dead and we know they've died because this was true if(fog){ ptc("FogEnable 0"); } } }
@LilGho$t
you could but its not needed...
think about this, the reason for the lagging is because the hack is called every time present is called aka every frame, so if you have 90fps thats 90 times the hack was called in second, but if you set the counter to 90 that means the hack is called once per second as opposed to 90 times. I think the user will not even notice if the no fog hack didn't comeback on for 1 second after respawn... so while your theory is correct the logic is not because it would be pointless to do it that way, even calling the push to console once per second is huge performance boost over lets say 90 times per second, and you can do without the extra code you have above because you are actually slowing it down do your code above, instead of just incrementing a value by one every frame you are doing multiple checks with booleans which takes longer to execute which means less performance.