View Full Version : ESP problem
Iamacheater
25th July 2005, 17:31
i am having problem with my ESP sometimes my esp fades and enemies stop rendering on my screen. can someone please help me?
my pawn related:
if ( bDrawESP )
{
DrawPlayerOnESP(Canvas);
}
my esp:
///////////////////////////////////////////////
//Draw ESP //
///////////////////////////////////////////////
function DrawPlayerOnESP (Canvas Canvas)
{
local vector A, B, C, TargetLocation, DiffLocation;
local int ScreenPosX, ScreenPosY, Distance;
local string pname;
For (I=0; I < MyController.GameReplicationInfo.PRIArray.Length; I++)
{
PRI = MyController.GameReplicationInfo.PRIArray[I];
TargetLocation = PRI.GetPawnLocation();
DiffLocation = TargetLocation - Me.Location;
Distance = (VSize(DiffLocation) * 0.0208333);
pname = pri.PlayerName;
if ( !PRI.isDead() )
{
GetAxes(Normalize(Me.GetViewRotation()),A,B,C);
if (DiffLocation Dot A > 0.70)
{
ScreenPosX = (Canvas.ClipX * 0.5) + ( (DiffLocation dot B)) * ((Canvas.ClipX * 0.5) / Tan(MyController.FovAngle * 0.00872664625997164788461845384244306)) / (DiffLocation dot A);
ScreenPosY = (Canvas.ClipY * 0.5) + (-(DiffLocation dot C)) * ((Canvas.ClipX * 0.5) / Tan(MyController.FovAngle * 0.00872664625997164788461845384244306)) / (DiffLocation dot A);
Canvas.SetPos(ScreenPosX, ScreenPosY + 2);
if(PRI.Team.TeamIndex != Me.PlayerReplicationInfo.Team.TeamIndex)
{
Canvas.SetDrawColor(255,128,128);
Canvas.SetPos(ScreenPosX, ScreenPosY + 2);
Canvas.DrawTextClipped(" ("$ string(Distance) $")");
Canvas.SetPos(ScreenPosX, ScreenPosY + 9);
Canvas.DrawTextClipped(" ("$ pname $")");
}
else
{
Canvas.SetDrawColor(128,255,255);
Canvas.SetPos(ScreenPosX, ScreenPosY + 2);
Canvas.DrawTextClipped(" ("$ string(Distance) $")");
Canvas.SetPos(ScreenPosX, ScreenPosY + 9);
Canvas.DrawTextClipped(" ("$ pname $")");
}
}
}
}
}
======================== i want to replace with a long distant esp if someone can help me please reply.
thank you.
kolbybrooks
25th July 2005, 18:03
My ESP is
if (bESP)
{
ESPvector = MyController.Player.Console.WorldToScreen(CurrentT argetLocation);
MyCanvas.SetDrawColor(255,0,0);
MyCanvas.SetPos(ESPvector.X, ESPvector.Y);
MyCanvas.DrawText(""$PRI.PlayerName$"");
MyCanvas.SetPos(ESPvector.X, ESPvector.Y + 10);
MyCanvas.DrawText("Distance: "$ String(Int(VSize(CurrentTargetLocation - MyLocation) / 48)));
}
Works very well, Name and Distance, I had Health bars but took them off
Iamacheater
25th July 2005, 18:48
i kept gettting this error message after cmpile: Error in MyInteraction.uc (269): Call to 'WorldToScreen': bad or missing parameter 1
kolbybrooks
25th July 2005, 19:03
Are you trying to use mine?
Iamacheater
25th July 2005, 19:34
no i am using a new same esp as above
deegan
25th July 2005, 20:19
i dont see worldtoscreen anywhere in the code you posted
Iamacheater
25th July 2005, 20:34
i dont see worldtoscreen anywhere in the code you posted
that's why i am totally lost - what the hell is that error anyway?
here is my new esp because i cant get the above esp to work: the above esp also gave me same error
///////////////////////////////////////////////
//Draw ESP //
///////////////////////////////////////////////
//************************************************** \\
//*** Pickup ESP Function **************************\\
//************************************************** \\
function ESP(PlayerReplicationInfo PRI)
{
local vector D, X, Y, Z;
ESPvector = MyController.Player.Console.WorldToScreen(CurrentT argetLocation);
GetAxes(Normalize(MyController.Pawn.PlayerReplicat ionInfo.MyPawn.Rotation) + Rot(0,16384,0),X,Y,Z);
D = PRI.GetPawnLocation() - MyController.Pawn.PlayerReplicationInfo.GetPawnLoc ation();
D.Z = 0;
if( (D dot Y) <0)
{
MyCanvas.SetPos(ESPvector.X-8, ESPvector.Y-8);
MyCanvas.Style = 3;
// MyCanvas.DrawIcon(Texture'osama',1.0);
MyCanvas.Style = 1;
if( PRI.myPawn != None )
{
MyCanvas.SetPos(ESPvector.X+10, ESPvector.Y);
MyCanvas.DrawText(PRI.PlayerName $ " (" $ string(PRI.myPawn.Health) $ "%)") ;
MyCanvas.SetPos(ESPvector.X+10, ESPvector.Y+10);
MyCanvas.DrawText(String(Int(VSize(PRI.GetPawnLoca tion() - MyController.Pawn.EyePosition()) / 48)) $ " m.") ;
}
else
{
MyCanvas.SetPos(ESPvector.X+10, ESPvector.Y);
MyCanvas.DrawText(PRI.PlayerName) ;
MyCanvas.SetPos(ESPvector.X+10, ESPvector.Y+10);
MyCanvas.DrawText(String(Int(VSize(PRI.GetPawnLoca tion() - MyController.Pawn.EyePosition()) / 48)) $ " m.") ;
}
}
}
post render:
if (bESP)
{
ESP(PRI);
}
function DrawWNESP (Canvas Canvas)
{
local Pickup W;
local float ScreenPosX;
local float ScreenPosY;
local vector X,Y,Z;
local vector MyLocation;
local vector DiffLocation;
local float fDist;
local string sGrenadeName;
MyLocation = Me.EyePosition();
foreach Me.Level.DynamicActors(Class'Pickup', W)
{
DiffLocation = W.Location - MyLocation;
GetAxes(Normalize(Me.GetViewRotation()),X,Y,Z);
if (DiffLocation Dot X > 0.70)
{
fDist = VSize(DiffLocation);
ScreenPosX = (Canvas.ClipX / 2) + ( (DiffLocation dot Y)) * ((Canvas.ClipX / 2) / Tan(MyController.FovAngle * Pi/360)) / (DiffLocation dot X);
ScreenPosY = (Canvas.ClipY / 2) + (-(DiffLocation dot Z)) * ((Canvas.ClipX / 2) / Tan(MyController.FovAngle * Pi/360)) / (DiffLocation dot X);
Canvas.SetPos(ScreenPosX, ScreenPosY);
Canvas.SetDrawColor(255,255,255);
sGrenadeName = "";
if (W.Skins.Length == 0)
{
W.Skins.Insert(0,1);
}
if (W.IsA('PickupT_M14_Incendiary'))
{
Canvas.SetDrawColor(255,0,0);
sGrenadeName = "M14 Incendiary";
}
else if (W.IsA('PickupT_M67_Frag'))
{
Canvas.SetDrawColor(255,0,0);
sGrenadeName = "M67 Frag";
}
else if (W.IsA('PickupT_RGD5_Frag'))
{
Canvas.SetDrawColor(255,0,0);
sGrenadeName = "RGD5 Frag";
}
else if (W.IsA('PickupT_MILES_Grenade'))
{
Canvas.SetDrawColor(255,0,0);
sGrenadeName = "MILES Frag";
}
else if (W.IsA('PickupT_M83_Smoke'))
{
Canvas.SetDrawColor(0,0,255);
sGrenadeName = "M83 Smoke";
}
else if (W.IsA('PickupT_M583_Flare'))
{
Canvas.SetDrawColor(0,0,255);
sGrenadeName = "M583 Flare";
}
else if (W.IsA('PickupT_M84_Stun'))
{
Canvas.SetDrawColor(255,255,0);
sGrenadeName = "M84 Stun";
}
Canvas.DrawText(sGrenadeName);
Canvas.SetDrawColor(0,255,0);
Canvas.SetPos(ScreenPosX + 10 , ScreenPosY + 10);
Canvas.DrawText(" D: " $ String(Int(fDist / 48)) $ " M");
Canvas.DrawActor(W, false, false);
}
}
}
Compile error message: Error in MyInteraction.uc (258): Call to 'WorldToScreen': bad or missing parameter 1
line 258: ESPvector = MyController.Player.Console.WorldToScreen(CurrentT argetLocation);
RandomDude55
25th July 2005, 21:45
line 258: ESPvector = MyController.Player.Console.WorldToScreen(CurrentT argetLocation);
Forum formatting error... It should be CurrentTargetLocation not CurrentT argetLocation or if you fixed that you need to define the vars
local vector CurrentTargetLocation, MyLocation;
CurrentTargetLocation = PRI.GetPawnLocation();
MyLocation = MyController.Pawn.Location;
Iamacheater
26th July 2005, 01:31
line 258: ESPvector = MyController.Player.Console.WorldToScreen(CurrentT argetLocation);
Forum formatting error... It should be CurrentTargetLocation not CurrentT argetLocation or if you fixed that you need to define the vars
local vector CurrentTargetLocation, MyLocation;
CurrentTargetLocation = PRI.GetPawnLocation();
MyLocation = MyController.Pawn.Location;
where do i put these?
CurrentTargetLocation = PRI.GetPawnLocation();
MyLocation = MyController.Pawn.Location;
RandomDude55
26th July 2005, 01:39
if (bESP)
{
ESPvector = MyController.Player.Console.WorldToScreen(CurrentT argetLocation);
MyCanvas.SetDrawColor(255,0,0);
MyCanvas.SetPos(ESPvector.X, ESPvector.Y);
MyCanvas.DrawText(""$PRI.PlayerName$"");
MyCanvas.SetPos(ESPvector.X, ESPvector.Y + 10);
MyCanvas.DrawText("Distance: "$ String(Int(VSize(CurrentTargetLocation - MyLocation) / 48)));
}
put local vector CurrentTargetLocation, MyLocation; at the beginning of the function you put
if (bESP)
{
ESPvector = MyController.Player.Console.WorldToScreen(CurrentT argetLocation);
MyCanvas.SetDrawColor(255,0,0);
MyCanvas.SetPos(ESPvector.X, ESPvector.Y);
MyCanvas.DrawText(""$PRI.PlayerName$"");
MyCanvas.SetPos(ESPvector.X, ESPvector.Y + 10);
MyCanvas.DrawText("Distance: "$ String(Int(VSize(CurrentTargetLocation - MyLocation) / 48)));
}
and
add
CurrentTargetLocation = PRI.GetPawnLocation();
MyLocation = MyController.Pawn.Location;
here
if (bESP)
{
CurrentTargetLocation = PRI.GetPawnLocation();
MyLocation = MyController.Pawn.Location;
ESPvector = MyController.Player.Console.WorldToScreen(CurrentT argetLocation);
MyCanvas.SetDrawColor(255,0,0);
MyCanvas.SetPos(ESPvector.X, ESPvector.Y);
MyCanvas.DrawText(""$PRI.PlayerName$"");
MyCanvas.SetPos(ESPvector.X, ESPvector.Y + 10);
MyCanvas.DrawText("Distance: "$ String(Int(VSize(CurrentTargetLocation - MyLocation) / 48)));
}
Iamacheater
26th July 2005, 01:50
thank you but now i get this error? \MyInteraction.uc(234) : Warning, 'MyLocation' : unreferenced local variable
Importing Defaults for Bot
Importing Defaults for MyInteraction
redundant data: bAmmoHack=True
Success - 0 error(s), 2 warning(s)
x@nderm@n
26th July 2005, 02:34
thank you but now i get this error? \MyInteraction.uc(234) : Warning, 'MyLocation' : unreferenced local variable
Importing Defaults for Bot
Importing Defaults for MyInteraction
redundant data: bAmmoHack=True
Success - 0 error(s), 2 warning(s)
look like your calling local vector MyLocation in a function, you don't need to do that if it is at the top int he variable declrations
and in your default properties bAmmoHack=True is there twice
Iamacheater
26th July 2005, 02:59
look like your calling local vector MyLocation in a function, you don't need to do that if it is at the top int he variable declrations
and in your default properties bAmmoHack=True is there twice
thank you so much i got th erros to go away but the esp dont work.
i nad in default bESP=true
Iamacheater
26th July 2005, 11:21
ok i am going mad i cant get esp working can some one point me to a thread fou uscript esp tutorila please i cant find the thread
DarkSix
26th July 2005, 20:00
ill help you with your esp problem
vBulletin® v3.7.4, Copyright ©2000-2009, Jelsoft Enterprises Ltd.