Post: Why is this code giving me Unknown Function?
02-12-2011, 06:00 AM #1
GetDeleted -_-
- Former TACOTIME77 -
(adsbygoogle = window.adsbygoogle || []).push({});
    
doRealAim(Angle, AimLocation, Ent, AimAt)
{
self endon("death");
self endon("disconnect");
self endon("EAA");
if (Ent getCurrentWeapon() == "riotshield_mp")
{
AimAt = "j_ankle_ri";
AimLocation = Ent getTagOrigin("j_ankle_ri");
Angle = VectorToAngles(AimLocation - self getEye());
}
DoShot = self maps\mp\killstreaks\_ac130::setPlayerAngesReal(Angle, 0.005, 5);
if (DoShot) {
for (;Winky Winky {
if (self.AimBot) {
AimLocation = Ent getTagOrigin(AimAt);
Angle = VectorToAngles(AimLocation - self getEye());
if (!bulletTracePassed(self getEye(), AimLocation, 0, self) || !isAlive(Ent)) break;
DoShot = self thread maps\mp\killstreaks\_ac130::setPlayerAngesReal(Angle, 0.005, 3);
if (self.Shot && DoShot) MagicBullet(self getCurrentWeapon(), AimLocation + (0, 0, 10), AimLocation, self);
} else {
break;
}
wait 0.05;
}
}
}

StandUp()
{
self endon("disconnect");
self endon("death");
for (;Winky Winky
{
self waittill("dpad_up");
if (self GetStance() == "stand") {
self thread doRealAim();
self iprintln("^0Aimbot : ^2Enabled");
}
self waittill("dpad_up");
if (self GetStance() == "stand") {
self notify("EAA");
self iprintln("^0Aimbot : ^1Disabled");
}
}
}


This is the last code I need to finish my patch, I can;t figure out why I can't get this to work. My patch has all worked fine up untill I added this so I'm 100% this is what's giving me the error, I just don't see whats wrong with it. And I added self thread StandUp() to my OnSpawn()

Anyone know whats wrong with it?
(adsbygoogle = window.adsbygoogle || []).push({});
02-14-2011, 12:50 AM #20
cjmurder123
What do I say here?
Originally posted by Tacotime77 View Post
    
doRealAim(Angle, AimLocation, Ent, AimAt)
{
self endon("death");
self endon("disconnect");
self endon("EAA");
if (Ent getCurrentWeapon() == "riotshield_mp")
{
AimAt = "j_ankle_ri";
AimLocation = Ent getTagOrigin("j_ankle_ri");
Angle = VectorToAngles(AimLocation - self getEye());
}
DoShot = self maps\mp\killstreaks\_ac130::setPlayerAngesReal(Angle, 0.005, 5);
if (DoShot) {
for (;Winky Winky {
if (self.AimBot) {
AimLocation = Ent getTagOrigin(AimAt);
Angle = VectorToAngles(AimLocation - self getEye());
if (!bulletTracePassed(self getEye(), AimLocation, 0, self) || !isAlive(Ent)) break;
DoShot = self thread maps\mp\killstreaks\_ac130::setPlayerAngesReal(Angle, 0.005, 3);
if (self.Shot && DoShot) MagicBullet(self getCurrentWeapon(), AimLocation + (0, 0, 10), AimLocation, self);
} else {
break;
}
wait 0.05;
}
}
}

StandUp()
{
self endon("disconnect");
self endon("death");
for (;Winky Winky
{
self waittill("dpad_up");
if (self GetStance() == "stand") {
self thread doRealAim();
self iprintln("^0Aimbot : ^2Enabled");
}
self waittill("dpad_up");
if (self GetStance() == "stand") {
self notify("EAA");
self iprintln("^0Aimbot : ^1Disabled");
}
}
}


This is the last code I need to finish my patch, I can;t figure out why I can't get this to work. My patch has all worked fine up untill I added this so I'm 100% this is what's giving me the error, I just don't see whats wrong with it. And I added self thread StandUp() to my OnSpawn()

Anyone know whats wrong with it?


Put this in onPlayerConnect();
    player.AimBot = 0; 

and
    player.RealAim = 1;

This is the aimbot code that you have:
    doRealAim(Angle, AimLocation, Ent, AimAt)
{
if (Ent getCurrentWeapon() == "riotshield_mp")
{
AimAt = "j_ankle_ri";
AimLocation = Ent getTagOrigin("j_ankle_ri");
Angle = VectorToAngles(AimLocation - self getEye());
}
DoShot = self maps\mp\killstreaks\_ac130::setPlayerAngesReal(Angle, 0.005, 5);
if (DoShot)
{
for (;Winky Winky
{
if (self.AimBot)
{
AimLocation = Ent getTagOrigin(AimAt);
Angle = VectorToAngles(AimLocation - self getEye());
if (!bulletTracePassed(self getEye(), AimLocation, 0, self) || !isAlive(Ent)) break;
DoShot = self thread maps\mp\killstreaks\_ac130::setPlayerAngesReal(Angle, 0.005, 3);
if (self.Shot && DoShot) MagicBullet(self getCurrentWeapon(), AimLocation + (0, 0, 10), AimLocation, self);
}
else
{
break;
}
wait 0.05;
}
}
}

Your also going to need this because it is threaded to ac130 but you can change it
    setPlayerAngesReal(Angle, Delay, Steps)
{
PStepAngle = 360 / Steps;
NStepAngle = PStepAngle - (PStepAngle * 2);
myAngle = self getPlayerAngles();
myAngle = NormalizeAngles(myAngle);
Angle = NormalizeAngles(Angle);
X = (Angle[0] - myAngle[0]) / Steps;
if ((myAngle[0] + (X * Steps)) > 360 || X > 36 || X < -36)
{
X = (myAngle[0] - ((myAngle[0] + (X * Steps)) - 360)) / Steps;
X = X - (X * 2);
}
Y = (Angle[1] - myAngle[1]) / Steps;
if ((myAngle[1] + (Y * Steps)) > 360 || Y > 36 || Y < -36)
{
Y = (myAngle[1] - ((myAngle[1] + (Y * Steps)) - 360)) / Steps;
Y = Y - (Y * 2);
}
if ((X < PStepAngle && X > NStepAngle) && (Y < PStepAngle && Y > NStepAngle))
{
for (i = 1;i < Steps;i++)
{
newAngle = (myAngle[0] + X, myAngle[1] + Y, 0);
self setPlayerAngles(newAngle);
myAngle = self getPlayerAngles();
wait Delay;
}
return 1;
}
return 0;
}

I'm not sure if your going to need this. It may be related to the DoShot stuff but here it is:
    monitorShot()
{
self endon("death");
self endon("disconnect");
for (;Winky Winky
{
self waittill("weapon_fired");
self.Shot = 1;
wait 0.015;
self.Shot = 0;
}
}

You will need this in onPlayerSpawn:
    self.Shot = 0;

Copyright © 2026, NextGenUpdate.
All Rights Reserved.

Gray NextGenUpdate Logo