Comments (7)
If you only want to have it work for non-automatics, you should be returning if the weapon is an automatic, not if it's not an automatic.
But using inclusivity (whitelisting) is easier than writing all the exclusives:
if (!weapon.pistol && !weapon.shotgun && !weapon.sniper) return
from abendigo.
Reply ?
from abendigo.
@punkjj Post your full plugin code with the insert code feature.
from abendigo.
`package org.abendigo.plugin.csgo
import org.abendigo.DEBUG
import org.abendigo.csgo.*
import org.abendigo.csgo.Client.clientDLL
import org.abendigo.csgo.Client.enemies
import org.abendigo.csgo.Engine.clientState
import org.abendigo.csgo.offsets.m_dwForceAttack
import java.lang.Math.*
object BoneTriggerPlugin : InGamePlugin("Bone Trigger", duration = 1) {
val TARGET_BONE = Bones.HEAD
private const val FOV = 10
private val aim = Vector(0F, 0F, 0F)
private var hold = false
override fun cycle() {
val myPosition = +Me().position
val angle = clientState(1024).angle()
try {
val weapon = (+Me().weapon).type!!
if (!weapon.pistol && !weapon.sniper1) return
} catch (t: Throwable) {
if (DEBUG) t.printStackTrace()
}
var closestDelta = Int.MAX_VALUE
for ((i, e) in enemies) {
val ePos = e.bonePosition(TARGET_BONE.id)
val distance = distance(myPosition, ePos)
calculateAngle(Me(), myPosition, ePos, aim.reset())
normalizeAngle(aim)
val pitchDiff = abs(angle.x - aim.x)
val yawDiff = abs(angle.y - aim.y)
val diff = sin(toRadians(pitchDiff.toDouble())) + sin(toRadians(yawDiff.toDouble()))
val delta = abs(diff * distance)
if (delta <= FOV && delta < closestDelta) closestDelta = delta.toInt()
}
if (closestDelta <= FOV && !hold) {
clientDLL[m_dwForceAttack] = 5.toByte()
hold = true
} else if (hold) {
clientDLL[m_dwForceAttack] = 4.toByte()
hold = false
}
}
`}``
from abendigo.
Here sniper1 = SSG 08 or scout
from abendigo.
Can you edit and put a toggle function ? and Right now I removed !weapon.automatic
from abendigo.
@Jire ^^
from abendigo.
Related Issues (20)
- In-game menu HOT 5
- The ingame controller doesnt work HOT 1
- how can i disable bhop without using the console?
- the updates are automatics?
- A lot of crashing in CSGO HOT 2
- Question HOT 2
- Error compiling
- vac :c HOT 2
- VAC BANS HOT 23
- Safe to use again? HOT 1
- safe to use again ? HOT 1
- Seems offsets are wrong HOT 3
- VAC kick HOT 3
- Fake Lag Enabling? HOT 1
- How to fix Bhop jump? HOT 4
- Abendigo not working... HOT 3
- For Mac.
- Bug?
- Not working as of 10/24/16 HOT 5
- Request HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from abendigo.