csgo-cheat-base icon indicating copy to clipboard operation
csgo-cheat-base copied to clipboard

NoFlash Help

Open cppjax opened this issue 4 years ago • 6 comments

I'm just using this base to get into creating CSGO cheats.

This is my current code for the NoFlash / Flash Reducer

void misc::visuals::reduceflash(c_usercmd* cmd)
{
	float flashalpha = !csgo::local_player->flash_alpha();
         while (true) {
	       if (!variables::noflash_enable)
			return;
		if (!csgo::local_player->is_flashed())
		      flashalpha = 0.f;
		return;

	}
}

It's really just a temporary code that I'm trying to figure out before I can even use this coding style / framework, as I don't currently understand it, critique would be nice. Don't need to be spoonfed. It makes sense in my head but doesn't work in game, at all.

cppjax avatar Nov 17 '20 16:11 cppjax

void misc::visuals::reduceflash() { csgo::local_player->flash_alpha() = variables::noflash_enable ? 0.f : 255.f; }

designer1337 avatar Nov 17 '20 16:11 designer1337

Overall ur code doesn't make sense at all, remove everything and replace it with line i provided above

Don't pass cmd as argument it's not even used, also don't call this in create move, frame stage notify is the right place

designer1337 avatar Nov 17 '20 16:11 designer1337

Understood, this coding style i'm just not used to and I'm new to making csgo cheats, I appreciate it dude! This well help me with the rest of the features.

cppjax avatar Nov 17 '20 16:11 cppjax

And yeah it was kind of a mess with the variables, I tried many different things.

cppjax avatar Nov 17 '20 16:11 cppjax

void misc::antiflash() {
	if (!variables::misc::antiflash || !csgo::local_player->is_alive())
		return;

	if (csgo::local_player->flash_duration() > 0) {
		csgo::local_player->flash_duration() = 0;
	}
};

milkshakegirlcollector avatar Mar 04 '21 13:03 milkshakegirlcollector

you aren't updating "flash_alpha", you're just updating it's copy from the function stack, not the player's flash alpha.

drcrypter2007 avatar Jul 11 '21 11:07 drcrypter2007