Open hubslave opened 7 years ago
idk, try to search all same conditions. May be there's already array with only enemies?
OK so I found an array with team members: ccsPlayer
(in EntityType.kt
)
Seems to me like this piece of code (in General.kt
) has something to do with what I'm looking for:
forEntities(ccsPlayer) {
val entity = it.entity
if (entity <= 0) return@forEntities
if (!entity.canShoot()) return@forEntities
val ePos: Angle = entity.bones(boneID)
val distance = position.distanceTo(ePos)
val dest = calculateAngle(me, ePos)
val pitchDiff = Math.abs(angle.x - dest.x)
val yawDiff = Math.abs(angle.y - dest.y)
val delta = Math.abs(Math.sin(Math.toRadians(yawDiff)) * distance)
val fovDelta = Math.abs((Math.sin(Math.toRadians(pitchDiff)) + Math.sin(Math.toRadians(yawDiff))) * distance)
if (fovDelta <= lockFOV && delta < closestDelta) {
closestDelta = delta
closestPlayer = entity
closestFOV = fovDelta
}
}
Removing !
in if (!entity.canShoot()) return@forEntities
somewhat worked but with unexpected behavior (no aimbot, triggerbot gets triggered randomly). Any help? @Jire @Austin72
Hi, I'm playing on a server in which everyone is on T side, and I've yet to find a way to make the aimbot/triggerbot work on non-enemy players.
I've tried removing
&& me.team() != team()
in\src\main\kotlin\com\charlatano\scripts\aim\General.kt
:As well as replacing it by
&& me.team() == entity.team()
, but that didn't work. Any ideas? Thanks