Solved trigger doesnt shoot 1 person

Hexui Undetected CSGO Cheats Sinkicheat PUBG Cheat

koro35

Jr.Coder
Full Member
Nobleman
Oct 30, 2013
59
379
2
Hey, so I made a triggerbot, but it doesn't shoot 1 person on the enemy team, but everyone else.
Relevant code:
C++:
int NumOfPlayers = 12;
C++:
	if (PlayerCrosshair > 0 && PlayerCrosshair < 32 && afssfads[PlayerCrosshair-1].Health > 0 && GetAsyncKeyState(0x5))
	// shoot]
C++:
agsgas.ReadInformation(); // our info
		for(int i = 0; i < NumOfPlayers; i++){
			afssfads[i].ReadInformation(i); // enemy info
		}
Any help is very appreciated, thanks!
 
Last edited:

rN'

Jr.Hacker
Meme Tier VIP
Jan 19, 2014
340
5,268
41
If you start the for-loop with int = 0, increase the value for the indexes because 0 isn't a valid entity index!
C++:
for(int i = 0; i < NumOfPlayers; i++){
			afssfads[i].ReadInformation(i + 1); // enemy info
		}
 

koro35

Jr.Coder
Full Member
Nobleman
Oct 30, 2013
59
379
2
If I remove the health check:
C++:
afssfads[PlayerCrosshair-1].Health > 0
it works one everyone, so something wrong with the looping through all players, still don't know whats wrong tho.
 
Attention! Before you post:

Read the How to Ask Questions Guide
99% of questions are answered in the Beginner's Guide, do it before asking a question.

No Hack Requests. Post in the correct section.  Search the forum first. Read the rules.

How to make a good post:

  • Fill out the form correctly
  • Tell us the game name & coding language
  • Post everything we need to know to help you
  • Ask specific questions, be descriptive
  • Post errors, line numbers & screenshots
  • Post code snippets using code tags
  • If it's a large project, zip it up and attach it

If you do not comply, your post may be deleted.  We want to help, please make a good post and we will do our best to help you.

Community Mods