[Code] C4 Read

Posts 1–15 of 35 · Page 1 of 3
[Code] C4 Read
Can't get if is true or not

Code:
...
DWORD bBombPlanted = 0x8F1;
bool plant = mem.Read<bool>(bBombPlanted);
if (plant == true) { ...
Should it be like bool plant = mem.Read<bool>(EntityList + bBombPlanted); //In my mind it will read if someone on the server has planted the bomb.
The way I do it is by looping though all entities and finding DT_PlantedC4 (I think that's what it's called) that is the entity for the planted bomb and then reading its netvars:

Code:
if ( pEntity->GetClientClass().m_iClassId == ClassID::PlantedC4) {
     bool isTicking = GetEntityNetvar<bool>(pEntity, "m_bBombTicking");
     if( isTicking ){
          //Draw timer
     }
Quote Originally Posted by MarkHC View Post
The way I do it is by looping though all entities and finding DT_PlantedC4 (I think that's what it's called) that is the entity for the planted bomb and then reading its netvars:

Code:
if ( pEntity->GetClientClass().m_iClassId == ClassID::PlantedC4) {
     bool isTicking = GetEntityNetvar<bool>(pEntity, "m_bBombTicking");
     if( isTicking ){
          //Draw timer
     }
ty

Let's see if u can help me with this, i was trying to do a tiggerbot but it dont shoot :/
Code:
void tig() {
	DWORD attack = 0x02E8F2B4;
	DWORD CrossHairID = 0x00002410;
	int inCross = mem.Read<int>(modClient.dwBase + CrossHairID);
	DWORD Trigger_EntityBase = mem.Read<DWORD>(modClient.dwBase + offEntityList + ((inCross - 1) * 16));
	int Trigger_EntityBase_TeamID = mem.Read<int>(Trigger_EntityBase + offEntityTeam);
	int LocalPlayer_Team = mem.Read<int>(modClient.dwBase + offEntityTeam);
	int TriggerDelay = 10;

	if (inCross > 0 && inCross <= 64) {
		if (Trigger_EntityBase_TeamID != LocalPlayer_Team) {
			Sleep(TriggerDelay);
			/* +attack */
			mem.Write<int>(modClient.dwBase + attack, 1);
			/* Sleep one millisecond */
			Sleep(1);
			/* -attack */
			mem.Write<int>(modClient.dwBase + attack, 0);
		}
	}
}
btw im using half of it from a open source as example, then i will do by myself
Quote Originally Posted by PhY'z View Post
ty

Let's see if u can help me with this, i was trying to do a tiggerbot but it dont shoot :/
Code:
void tig() {
	DWORD attack = 0x02E8F2B4;
	DWORD CrossHairID = 0x00002410;
	int inCross = mem.Read<int>(modClient.dwBase + CrossHairID);
	DWORD Trigger_EntityBase = mem.Read<DWORD>(modClient.dwBase + offEntityList + ((inCross - 1) * 16));
	int Trigger_EntityBase_TeamID = mem.Read<int>(Trigger_EntityBase + offEntityTeam);
	int LocalPlayer_Team = mem.Read<int>(modClient.dwBase + offEntityTeam);
	int TriggerDelay = 10;

	if (inCross > 0 && inCross <= 64) {
		if (Trigger_EntityBase_TeamID != LocalPlayer_Team) {
			Sleep(TriggerDelay);
			/* +attack */
			mem.Write<int>(modClient.dwBase + attack, 1);
			/* Sleep one millisecond */
			Sleep(1);
			/* -attack */
			mem.Write<int>(modClient.dwBase + attack, 0);
		}
	}
}
btw im using half of it from a open source as example, then i will do by myself
5 is for +attack, 4 is for -attack, if you actually would've tried and find the addr with cheat engine you would've noticed that, anywya you should sleep more than 1 millisecond.

Think about it:
The game wont be able to register each shot at such pace, its just not possible, most games probably have around 50+ delay between something actually happening, I have 100 for most of my triggers.
Quote Originally Posted by Yemiez View Post
5 is for +attack, 4 is for -attack, if you actually would've tried and find the addr with cheat engine you would've noticed that, anywya you should sleep more than 1 millisecond.

Think about it:
The game wont be able to register each shot at such pace, its just not possible, most games probably have around 50+ delay between something actually happening, I have 100 for most of my triggers.
Ohhhhhhhhhhhh i really forgot about the attack :/ i tried it after watching fleep's tiggerbot tutorial, and dont got it, will watch again, thanks

--------------------------------
Changed 1 to 5 and 0 to 4, stills nothing, set Sleep(105); nothing, i think is something with the offsets :/
H3h3, i know that Source

But like PsychoBitch said, sleeping 1 millisecond doesn't really work. I found out Sleeping 10 milliseconds works just fine.
Quote Originally Posted by WasserEsser View Post
H3h3, i know that Source

But like PsychoBitch said, sleeping 1 millisecond doesn't really work. I found out Sleeping 10 milliseconds works just fine.
Sleeping 10 milliseconds will still not work well, how I do it:

Code:
 

//... in trigger

if (pLocal->Team != pEntity->Team) {
      srand(g_pEngine->Timer->GetTime());    
      g_pEngine->gMemory()->Write<int>(gContainer->_client + gAddress()->GetOffy()->Attack, 5);
      Sleep(rand() % 150);
      g_pEngine->gMemory()->Write<int>(gContainer->_client + gAddress()->GetOffy()->Attack, 4);
}

//...
Quote Originally Posted by WasserEsser View Post
H3h3, i know that Source

But like PsychoBitch said, sleeping 1 millisecond doesn't really work. I found out Sleeping 10 milliseconds works just fine.
Hhahah yep from u

---------

And thanks for the help Psycho i think i got it now

---------
@MarkHC
Code:
if ( pEntity->GetClientClass().m_iClassId == ClassID::PlantedC4) {
     bool isTicking = GetEntityNetvar<bool>(pEntity, "m_bBombTicking");
     if( isTicking ){
          //Draw timer
     }
pEntity = Player EntityList?
GetClientClass.m_iClassId = NetVar = 0x23AC
ClassID::PlantedC4 = "Weapon" ID
GetEntityNetvar = mem.Read<bool>(offEntityList + 0x0D50) // 0x0D50 bBombTicking
if ( ... ) { }
ClassID::PlantedC4 is the.. well.. the class id of the planted c4.

Each entity has its own class id that tells you what type of an entity it is. A player entity is 34 (class name "CCSPlayer"). The planted C4 is 103, name "CPlantedC4"

Here's a dump i just made:

Code:
ID  - Name
001 - CAK47
009 - CBaseCSGrenadeProjectile
011 - CBaseEntity
020 - CBaseTrigger
028 - CC4
029 - CCascadeLight
031 - CColorCorrection
033 - CCSGameRulesProxy
034 - CCSPlayer
035 - CCSPlayerResource
036 - CCSRagdoll
037 - CCSTeam
038 - CDEagle
039 - CDecoyGrenade
042 - CDynamicProp
057 - CEnvTonemapController
058 - CEnvWind
064 - CFogController
066 - CFunc_Dust
069 - CFuncBrush
081 - CHEGrenade
088 - CKnife
092 - CMolotovGrenade
097 - CParticleSystem
101 - CPhysicsPropMultiplayer
103 - CPlantedC4
109 - CPostProcessController
112 - CPredictedViewModel
120 - CRopeKeyframe
123 - CShadowControl
125 - CSmokeGrenade
130 - CSprite
135 - CSun
192 - CVGuiScreen
193 - CVoteController
197 - CWeaponAWP
203 - CWeaponFamas
207 - CWeaponGalilAR
208 - CWeaponGlock
209 - CWeaponHKP2000
210 - CWeaponM249
212 - CWeaponM4A1
214 - CWeaponMag7
217 - CWeaponMP9
218 - CWeaponNegev
219 - CWeaponNOVA
221 - CWeaponP250
228 - CWeaponSG556
235 - CWeaponXM1014
Some interesting classes:

09 - CBaseCSGrenadeProjectile, you can do some l33t grande ESP/tracers with it.
28 - The not planted C4. You can use it to do a C4 ESP (shows you where the C4 is, which player is carrying it, etc).
33 - Has a lot of info about the current game.
35 - CCSPlayerResource, also known as GameResources or "ScoreboardInfo" has information about players. Kill, Deaths, Competitive rank, competitive wins, etc..
Quote Originally Posted by MarkHC View Post
ClassID::PlantedC4 is the.. well.. the class id of the planted c4.

Each entity has its own class id that tells you what type of an entity it is. A player entity is 34 (class name "CCSPlayer"). The planted C4 is 103, name "CPlantedC4"

Here's a dump i just made:

Code:
ID  - Name
001 - CAK47
009 - CBaseCSGrenadeProjectile
011 - CBaseEntity
020 - CBaseTrigger
028 - CC4
029 - CCascadeLight
031 - CColorCorrection
033 - CCSGameRulesProxy
034 - CCSPlayer
035 - CCSPlayerResource
036 - CCSRagdoll
037 - CCSTeam
038 - CDEagle
039 - CDecoyGrenade
042 - CDynamicProp
057 - CEnvTonemapController
058 - CEnvWind
064 - CFogController
066 - CFunc_Dust
069 - CFuncBrush
081 - CHEGrenade
088 - CKnife
092 - CMolotovGrenade
097 - CParticleSystem
101 - CPhysicsPropMultiplayer
103 - CPlantedC4
109 - CPostProcessController
112 - CPredictedViewModel
120 - CRopeKeyframe
123 - CShadowControl
125 - CSmokeGrenade
130 - CSprite
135 - CSun
192 - CVGuiScreen
193 - CVoteController
197 - CWeaponAWP
203 - CWeaponFamas
207 - CWeaponGalilAR
208 - CWeaponGlock
209 - CWeaponHKP2000
210 - CWeaponM249
212 - CWeaponM4A1
214 - CWeaponMag7
217 - CWeaponMP9
218 - CWeaponNegev
219 - CWeaponNOVA
221 - CWeaponP250
228 - CWeaponSG556
235 - CWeaponXM1014
Some interesting classes:

09 - CBaseCSGrenadeProjectile, you can do some l33t grande ESP/tracers with it.
28 - The not planted C4. You can use it to do a C4 ESP (shows you where the C4 is, which player is carrying it, etc).
33 - Has a lot of info about the current game.
35 - CCSPlayerResource, also known as GameResources or "ScoreboardInfo" has information about players. Kill, Deaths, Competitive rank, competitive wins, etc..
OH thx now lets try to glowc4 and do the timer based on color
I really didn't understand how to use these classes in an external hack... Can somebody explain :?
Quote Originally Posted by Block4o View Post
I really didn't understand how to use these classes in an external hack... Can somebody explain :?


Atleast that's what i'm guessing.
Is that correct??

Code:
void c4glow() {
	DWORD C4Glow = mem.Read<DWORD>(modClient.dwBase + offGlow);
	if (C4Glow != NULL) {
		int getweap = mem.Read<int>(offEntityList + 0x00001690); //iWeaponID
		DWORD C4Obj = C4Glow + i * sizeof(GlowObjectDefinition_t);
		GlowObjectDefinition_t glowObj = mem.Read<GlowObjectDefinition_t>(C4Obj);
		if (getweap == 028) //NOTPLANTED C4
		mem.Write<float>(C4Obj + 0x4, vm / 255);
		mem.Write<float>(C4Obj + 0x8, vr / 255);
		mem.Write<float>(C4Obj + 0xC, az / 255);
		mem.Write<float>(C4Obj + 0x10, m);
		mem.Write<BOOL>(C4Obj + 0x24, true);
		mem.Write<BOOL>(C4Obj + 0x25, false);
	}
}
Quote Originally Posted by PhY'z View Post
Is that correct??

Code:
void c4glow() {
	DWORD C4Glow = mem.Read<DWORD>(modClient.dwBase + offGlow);
	if (C4Glow != NULL) {
		int getweap = mem.Read<int>(offEntityList + 0x00001690); //iWeaponID
		DWORD C4Obj = C4Glow + i * sizeof(GlowObjectDefinition_t);
		GlowObjectDefinition_t glowObj = mem.Read<GlowObjectDefinition_t>(C4Obj);
		if (getweap == 028) //NOTPLANTED C4
		mem.Write<float>(C4Obj + 0x4, vm / 255);
		mem.Write<float>(C4Obj + 0x8, vr / 255);
		mem.Write<float>(C4Obj + 0xC, az / 255);
		mem.Write<float>(C4Obj + 0x10, m);
		mem.Write<BOOL>(C4Obj + 0x24, true);
		mem.Write<BOOL>(C4Obj + 0x25, false);
	}
}
You are writing the size of a BOOL which is defined as an int as far as i know. change

Code:
mem.Write<BOOL>(C4Obj + 0x24, true);
mem.Write<BOOL>(C4Obj + 0x25, false);
to

Code:
mem.Write<bool>(C4Obj + 0x24, true);
mem.Write<bool>(C4Obj + 0x25, false);
Quote Originally Posted by WasserEsser View Post
You are writing the size of a BOOL which is defined as an int as far as i know. change

Code:
mem.Write<BOOL>(C4Obj + 0x24, true);
mem.Write<BOOL>(C4Obj + 0x25, false);
to

Code:
mem.Write<bool>(C4Obj + 0x24, true);
mem.Write<bool>(C4Obj + 0x25, false);
sorry but should it be in? cause u wrote 2 time bool
Posts 1–15 of 35 · Page 1 of 3

Post a Reply

Similar Threads

Tags for this Thread

None

Talk with us