/Moved to the correct section.
Hey guys, can some help me.. always when the dll gets into the Trigger funktion cs go crashs so ...
Could it be thath the offsets are wrong, i mean the dw_CrossID, the Offset isnt right always... thx in advanceCode://LOCAL DWORD dw_PlayerBase = 0xA2F4AC; DWORD dw_Health = 0xFC; DWORD dw_Team = 0xF0; //ENEMY DWORD dw_EntityBase = 0x4A4A894; DWORD dw_EntityLoopDist = 0x10; DWORD dw_NumPlayers = 32; //BUNNY DWORD dw_ForceJump = 0x4EDFC98; DWORD dw_flagsoff = 0x100; //TRIGGER DWORD dw_CrossId = 0xAA48; DWORD dw_ForceAttack = 0x2E8A864; bool ForceJump (bool _value) { return *(bool*)((DWORD)clientDll + dw_ForceJump) = _value; } struct EntityList { int m_iTeamNum; DWORD BaseEntity; }EntityList[32]; DWORD IsTargetEnemy() //returns 1 if crosshairs are over enemy, 0 if not { for (int i = 0; i < dw_NumPlayers; i++) //Loop through players and grab information { EntityList[i].BaseEntity = *(DWORD*)dw_EntityBase + (i * dw_EntityLoopDist); EntityList[i].BaseEntity = *(DWORD*)dw_EntityPlayer + dw_Team; } if ((EntityList[GetLocalPlayerVar(dw_CrossId) - 1].m_iTeamNum != GetLocalPlayerVar(dw_Team)) | 0x00) return 1; else return 0; } void Trigger () { if (TriggerStat == true) { while (!clientDll) { DWORD clientDll = (DWORD)GetModuleHandle("client.dll"); Sleep(10); } while (!dw_LocalPlayer) { GetLocalPlayer(); Sleep(10); } if (IsTargetEnemy() == 1) { ForceAttack (true); Sleep(60); ForceAttack (false); } Sleep(1); } }
If you need something to fix it, i can give it you
Last edited by xShouty; 06-07-2016 at 12:15 PM.
/Moved to the correct section.
Before checking the team check if the player is valid
for (int i = 0; i < dw_NumPlayers; i++) //Loop through players and grab information
{
EntityList[i].BaseEntity = *(DWORD*)dw_EntityBase + (i * dw_EntityLoopDist);
if(!EntityList[i].BaseEntity)
continue;
EntityList[i].BaseEntity = *(DWORD*)dw_EntityPlayer + dw_Team;
and also ive not made cheats with structs but entityplayer + team != EntityList[i].BaseEntity should be something like EntityList[i].BaseEntityTeam?
}
Last edited by affe2626; 06-07-2016 at 03:14 PM.
You need to check if there is NO null pointer before u get the team and I would do it bit different.
- - - Updated - - -Code:InTriggerloop ...... while (!dw_LocalPlayer) { GetLocalPlayer(); Sleep(10); } int CrossID = GetLocalPlayerVar(dw_CrossId); if(CrossID != 0) { *(DWORD*)dw_EntityBase + (CrossID * dw_EntityLoopDist); if(dw_EntityBase!= null && dw_EntityBase.m_iTeamNum != GetLocalPlayerVar(dw_Team)) Shoot(); } .......
Oh yeah and btw make if() for IsInGame too
Please... don't make an incross triggerbot internally!
d4rkW (06-07-2016),idkanick23 (06-09-2016),ImStyL (06-07-2016)
Last edited by WasserEsser; 06-08-2016 at 06:26 AM.
https://developer.valvesoftware.com/wiki/UTIL_TraceLine
It's the description of a wrapper function, but it still applies, UTIL_TraceLine uses IEngineTrace::TraceRay, it only sets up the Ray_t structure and a tracefilter for you.
4773n0x (06-08-2016)
Ok, thank u very much. I know that this "Function" creats two points A and B and that it draw a "Line" from the shot of a weapon to a point, where the shot gets into it, that would be the Enemy Player in my TriggerBot, but i dont know how to use it so do u have a example source or something else which could explain me that in an "easy" way ? =)
Please kill yourself with inCross thing internally. Why TraceRays even exist then; we have the cool inCross...
Here is some pasted example from ayyware:
Code:void CLegitBot::DoTrigger(CUserCmd *pCmd) { IClientEntity* pLocal = hackManager.pLocal(); // Don't triggerbot with the knife.. CBaseCombatWeapon* pWeapon = (CBaseCombatWeapon*)Interfaces::EntList->GetClientEntityFromHandle(pLocal->GetActiveWeaponHandle()); if (pWeapon) { if (pWeapon->GetAmmoInClip() == 0 || !GameUtils::IsBallisticWeapon(pWeapon)) return; } else return; // Triggerbot // Get the view with the recoil Vector ViewAngles; Interfaces::Engine->GetViewAngles(ViewAngles); ViewAngles += pLocal->localPlayerExclusive()->GetAimPunchAngle() * 2.f; // Build a ray going fowards at that angle Vector forwardVec; AngleVectors(ViewAngles, &forwardVec); forwardVec *= 8192.f; // Get ray start / end Vector start = pLocal->GetOrigin() + pLocal->GetViewOffset(); Vector end = start + forwardVec; trace_t trace; GameUtils::UTIL_TraceLine(start, end, MASK_SOLID, pLocal, 0, &trace); if (trace.m_pEnt && (trace.hitgroup > 0 && trace.hitgroup <= 7)) { if (TargetMeetsTriggerRequirements(trace.m_pEnt)) { pCmd->buttons |= IN_ATTACK; } } }
Last edited by Graaff; 06-08-2016 at 01:24 PM.
Ok, i know its stupid to do it with InCross but i want that it works...
This is my Code now but it still doesnt work, when i activate the Trigger, my Bunnyhop doesnt work anymore that seems that the code hangs in al while function, but it cant hang in the while func from the local player, because my BH is working fine..., so i hope someone can help me nowbool ForceAttack(bool _value) {
return *(bool*)((DWORD)clientDll + dw_ForceAttack) = _value;
}
DWORD GetEntityInCh() {
return *(DWORD*)((DWORD)clientDll + dw_EntityBase + dw_CrossId * dw_EntityLoopDist);
}
DWORD GetLocalPlayerVar(DWORD _value) {
GetLocalPlayer();
return *(DWORD*)dw_LocalPlayer = _value;
}
void Trigger() {
if (TriggerStat == true) {
while (!dw_LocalPlayer) {
GetLocalPlayer();
Sleep(10);
}
if (GetEntityInCh() != 0) {
dw_EntityHealth = *(DWORD*)(GetEntityInCh() + dw_HealthOff);
dw_EntityTeam = *(DWORD*)(GetEntityInCh() + dw_TeamOff);
if (dw_EntityHealth > 0 && dw_EntityTeam != GetLocalPlayerVar(dw_TeamOff)) {
ForceAttack(true);
Sleep(60);
ForceAttack(false);
}
}
}
Sleep(10);
}