Go Back   UnKnoWnCheaTs - Multiplayer Game Hacks and Cheats > The Graveyard > Less Popular Games > Crysis

- Sponsored Advertisement -
http://www.myfpscheats.com/

Welcome to the UnKnoWnCheaTs - Multiplayer Game Hacks and Cheats.
You have to register before you can post and see and access any of the advanced forum features, please click the register link to proceed to the registration form. To start viewing threads or posts, select a forum that you want to visit from the selection below.
Crysis
hacks cheats tutorials downloads source code
You are Unregistered, please register to gain Full access.    
Reply
 
Thread Tools

Creating basic Esp
Old 04-04-2009, 10:07 PM   #1
Level 3

R4z8r's Avatar

Join Date: Sep 2006
Location: The Netherlands
Posts: 1,233
Reputation: 19321
Rep Power: 284
R4z8r Will always be a legend at UCR4z8r Will always be a legend at UCR4z8r Will always be a legend at UCR4z8r Will always be a legend at UCR4z8r Will always be a legend at UCR4z8r Will always be a legend at UCR4z8r Will always be a legend at UCR4z8r Will always be a legend at UCR4z8r Will always be a legend at UCR4z8r Will always be a legend at UCR4z8r Will always be a legend at UC
Points: 17,998, Level: 18
Points: 17,998, Level: 18 Points: 17,998, Level: 18 Points: 17,998, Level: 18
Activity: 1.1%
Activity: 1.1% Activity: 1.1% Activity: 1.1%
Last Achievements
Creating basic Esp

This is probably nothing new, since okidoki ripped crysis apart already, but it wasnt posted here yet. If you don't got the Crysis sdk already, download it!

First we need to get the local entity/actor:

Code:
IActor* CBot::GetLocalPlayer()
{
	if(!System->GetIGame() )
		return 0;

	if(!System->GetIGame()->GetIGameFramework())
		return 0;

	return System->GetIGame()->GetIGameFramework()->GetClientActor(); 
}

IEntity* CBot::GetLocalEntity()
{
	IActor* Player = GetLocalPlayer();

	if(!Player)
		return 0;

	return Player->LinkedEntity;
}
Next we need to create an iterator, so we can loop through all the players + entities.

Code:
ActorIt = System->GetIGame()->GetIGameFramework()->GetIActorSystem()->CreateActorIterator();
IEntityIt* EntityIt = System->GetIEntitySystem()->GetEntityIterator();
We also need a WorldToScreen function( the one I am using is the one from the engine though ):

Code:
BOOL CBot::WorldToScreen(FLOAT* vEntPos, FLOAT* vOut)
{
	IRenderer* Renderer = System->GetIRenderer();

	Renderer->ProjectToScreen( vEntPos[0], vEntPos[1], vEntPos[2], &vOut[0], &vOut[1], &vOut[2] ); 

	vOut[0] *= ( Renderer->GetWidth()  / 100.0f ); 
	vOut[1] *= ( Renderer->GetHeight() / 100.0f );
	vOut[2] *= 1.0f; 

	return ( (vOut[2] < 1.0f) ); 
}
We also want to use the bones, don't we?

Code:
Vec3 CBot::GetBoneOrigin( IEntity* Ent, CONST CHAR* szBoneName )
{
	if(!Ent->GetCharacter(0))
		return Vec3(0,0,0); 

	ISkeletonPose* Skeleton = Ent->GetCharacter(0)->GetISkeletonPose(); 

	if(!Skeleton)
		return Vec3(0,0,0); 

	uint16 BoneId = Skeleton->GetBoneIdByName( szBoneName ); 

	Vec3 vOffset = Skeleton->GetBoneById( BoneId )->vOffset; 

	return (Ent->GetWorldPos() + vOffset); 
}

Vec3 CBot::GetBoneOrigin( IEntity* Ent, uint16 BoneId )
{
	if(!Ent->GetCharacter(0))
		return Vec3(0,0,0); 

	ISkeletonPose* Skeleton = Ent->GetCharacter(0)->GetISkeletonPose(); 

	if(!Skeleton)
		return Vec3(0,0,0); 

	Vec3 vOffset = Skeleton->GetBoneById( BoneId )->vOffset; 

	return (Ent->GetWorldPos() + vOffset); 
}
Now we just need to loop through all players + entities:

Code:
for(; IActor* Player = ActorIt.get()->Next(); )
	{
		IEntity* Ent = Player->LinkedEntity;

		if( (!Player) || (Player == LocalPlayer) || (!Ent) ) 
			continue; 

		if(!WorldToScreen( GetBoneOrigin( Ent, "Bip01 Neck" ), vOut ) )
			continue;

		if( (vOut[0] < 0) || (vOut[0] > pViewPort.Width) || (vOut[1] < 0) || (vOut[1] > pViewPort.Height) )
			continue; 

if(pMenu.MySubMenu[ESP]->GetValueByName( "Name Esp" ) )
		{
			Draw.Text_Border( vOut[0] - 10.0f, vOut[1], dwColor, EspFont, "%s", Player->LinkedEntity->GetName() ); 
			vOut[1] += 13.0f; 
		}
The bones that can be used:

Code:
CONST CHAR* BoneName[37] = {  
	"eye_left_bone",
	"eye_right_bone",
	"weapon_bone", 
	"Bip01 Pelvis", 
    "Bip01 Spine", 
    "Bip01 L Thigh", 
    "Bip01 R Thigh", 
    "Bip01 Spine1", 
    "Bip01 Spine2", 
    "Bip01 Neck", 
    "Bip01 Head", 
    "Bip01 L Clavicle", 
    "Bip01 R Clavicle", 
    "Bip01 L UpperArm", 
    "Bip01 L Forearm", 
    "Bip01 L Hand", 
    "Bip01 L Finger0", 
    "Bip01 L Finger1", 
    "Bip01 L Finger2", 
    "Bip01 L Finger01", 
    "Bip01 L Finger11", 
    "Bip01 L Finger21", 
    "Bip01 R UpperArm", 
    "Bip01 R Forearm", 
    "Bip01 R Hand", 
    "Bip01 R Finger0", 
    "Bip01 R Finger1", 
    "Bip01 R Finger2", 
    "Bip01 R Finger01", 
    "Bip01 R Finger11", 
    "Bip01 R Finger21", 
    "Bip01 L Calf", 
    "Bip01 L Foot", 
    "Bip01 L Toe0", 
    "Bip01 R Calf", 
    "Bip01 R Foot", 
    "Bip01 R Toe0", 
};
Well, that's all I guess. Credits all go to okidoki, he did all the major work.

Have fun hacking,

R4z8r

Last edited by R4z8r; 04-04-2009 at 11:59 PM.
R4z8r is offline

Reply With Quote


Old 04-09-2009, 06:55 AM   #2
Retired Administrator

zero_tolerance's Avatar

Join Date: Jun 2005
Posts: 3,184
Reputation: 22143
Rep Power: 366
zero_tolerance has reputation that takes up 2GB of server space!zero_tolerance has reputation that takes up 2GB of server space!zero_tolerance has reputation that takes up 2GB of server space!zero_tolerance has reputation that takes up 2GB of server space!zero_tolerance has reputation that takes up 2GB of server space!zero_tolerance has reputation that takes up 2GB of server space!zero_tolerance has reputation that takes up 2GB of server space!zero_tolerance has reputation that takes up 2GB of server space!zero_tolerance has reputation that takes up 2GB of server space!zero_tolerance has reputation that takes up 2GB of server space!zero_tolerance has reputation that takes up 2GB of server space!
Points: 27,952, Level: 24
Points: 27,952, Level: 24 Points: 27,952, Level: 24 Points: 27,952, Level: 24
Activity: 0%
Activity: 0% Activity: 0% Activity: 0%
Last Achievements
Nice job R4z8r, you have been doing a great job all around. Its nice to see some fresh posts in the Crysis section

+rep
__________________



zero_tolerance is offline

Reply With Quote

Old 08-22-2009, 06:19 AM   #3
n00bie

MegaDeath409's Avatar

Join Date: Aug 2009
Posts: 2
Reputation: 10
Rep Power: 31
MegaDeath409 has made posts that are generally average in quality
What do we do with the code afterwards, compile it into a dll and...
MegaDeath409 is offline

Reply With Quote

Old 08-22-2009, 06:20 AM   #4
Follow me children

Jesus.'s Avatar

Join Date: Aug 2003
Posts: 3,255
Reputation: 42353
Rep Power: 592
Jesus. has a huge epeen!Jesus. has a huge epeen!Jesus. has a huge epeen!Jesus. has a huge epeen!Jesus. has a huge epeen!Jesus. has a huge epeen!Jesus. has a huge epeen!Jesus. has a huge epeen!Jesus. has a huge epeen!Jesus. has a huge epeen!Jesus. has a huge epeen!
Recognitions:
Members who have contributed financial support towards UnKnoWnCheaTs. Donation (2)
Points: 35,603, Level: 28
Points: 35,603, Level: 28 Points: 35,603, Level: 28 Points: 35,603, Level: 28
Activity: 3.3%
Activity: 3.3% Activity: 3.3% Activity: 3.3%
Last Achievements
inject into the game....
__________________
Nigga who is UH.
IPancakes.
Jesus. is offline

Reply With Quote

Old 08-22-2009, 07:51 AM   #5
Super Moderator

Kiwinz's Avatar

Join Date: Jan 2008
Location: New Zealand
Posts: 2,550
Reputation: 73932
Rep Power: 840
Kiwinz has a huge epeen!Kiwinz has a huge epeen!Kiwinz has a huge epeen!Kiwinz has a huge epeen!Kiwinz has a huge epeen!Kiwinz has a huge epeen!Kiwinz has a huge epeen!Kiwinz has a huge epeen!Kiwinz has a huge epeen!Kiwinz has a huge epeen!Kiwinz has a huge epeen!
Points: 47,215, Level: 32
Points: 47,215, Level: 32 Points: 47,215, Level: 32 Points: 47,215, Level: 32
Activity: 25.9%
Activity: 25.9% Activity: 25.9% Activity: 25.9%
Last Achievements
.....with a injector like this http://www.ucdownloads.com/downloads...do=file&id=349
__________________



"Those who seek revenge must dig two graves, one for his enemy and another for himself."


On the internet I will - in no shape or form - take personal offence to peoples comments, idea's or views, I assume the people who I reply to won't either.
Kiwinz is online now

Reply With Quote

Old 08-22-2009, 09:11 AM   #6
n00bie

MegaDeath409's Avatar

Join Date: Aug 2009
Posts: 2
Reputation: 10
Rep Power: 31
MegaDeath409 has made posts that are generally average in quality
... And this code interfaces with the game classes how... I'd assume you need to, at some point, gain access to the main game structure...
MegaDeath409 is offline

Reply With Quote

Old 08-22-2009, 11:57 AM   #7
« Alkies Bitch »

Turv's Avatar

Join Date: Nov 2004
Posts: 1,460
Reputation: 12882
Rep Power: 246
Turv 's rep takes up 1 gig of server spaceTurv 's rep takes up 1 gig of server spaceTurv 's rep takes up 1 gig of server spaceTurv 's rep takes up 1 gig of server spaceTurv 's rep takes up 1 gig of server spaceTurv 's rep takes up 1 gig of server spaceTurv 's rep takes up 1 gig of server spaceTurv 's rep takes up 1 gig of server spaceTurv 's rep takes up 1 gig of server spaceTurv 's rep takes up 1 gig of server spaceTurv 's rep takes up 1 gig of server space
Last Achievements
Quote:
Originally Posted by MegaDeath409 View Post
... And this code interfaces with the game classes how... I'd assume you need to, at some point, gain access to the main game structure...
This is just a portion of code, not the finished product. There are resources available on this forum to help you acheive this if your serious in learning and not wanting to copy/paste/compile/inject
__________________


Turv is offline

Reply With Quote

Old 08-22-2009, 09:17 PM   #8
Follow me children

Jesus.'s Avatar

Join Date: Aug 2003
Posts: 3,255
Reputation: 42353
Rep Power: 592
Jesus. has a huge epeen!Jesus. has a huge epeen!Jesus. has a huge epeen!Jesus. has a huge epeen!Jesus. has a huge epeen!Jesus. has a huge epeen!Jesus. has a huge epeen!Jesus. has a huge epeen!Jesus. has a huge epeen!Jesus. has a huge epeen!Jesus. has a huge epeen!
Recognitions:
Members who have contributed financial support towards UnKnoWnCheaTs. Donation (2)
Points: 35,603, Level: 28
Points: 35,603, Level: 28 Points: 35,603, Level: 28 Points: 35,603, Level: 28
Activity: 3.3%
Activity: 3.3% Activity: 3.3% Activity: 3.3%
Last Achievements
Quote:
Originally Posted by MegaDeath409 View Post
... And this code interfaces with the game classes how... I'd assume you need to, at some point, gain access to the main game structure...
yeah i think it is assumed u have the crysis source code and some basic project already set up, then u can modify and tweak the code yourself in order to make it useful.
__________________
Nigga who is UH.
IPancakes.
Jesus. is offline

Reply With Quote

Old 11-10-2009, 10:37 PM   #9
Donator

Blubsi's Avatar

Join Date: May 2009
Posts: 535
Reputation: 10144
Rep Power: 144
Blubsi 's rep takes up 1 gig of server spaceBlubsi 's rep takes up 1 gig of server spaceBlubsi 's rep takes up 1 gig of server spaceBlubsi 's rep takes up 1 gig of server spaceBlubsi 's rep takes up 1 gig of server spaceBlubsi 's rep takes up 1 gig of server spaceBlubsi 's rep takes up 1 gig of server spaceBlubsi 's rep takes up 1 gig of server spaceBlubsi 's rep takes up 1 gig of server spaceBlubsi 's rep takes up 1 gig of server spaceBlubsi 's rep takes up 1 gig of server space
Recognitions:
Members who have contributed financial support towards UnKnoWnCheaTs. Donation (1)
Points: 9,067, Level: 11
Points: 9,067, Level: 11 Points: 9,067, Level: 11 Points: 9,067, Level: 11
Activity: 4.7%
Activity: 4.7% Activity: 4.7% Activity: 4.7%
Last Achievements
thats cool ,and really great of u to post
...Black
Blubsi is online now

Reply With Quote
Reply  

  • Submit Thread to Digg
  • Submit Thread to del.icio.us
  • Submit Thread to StumbleUpon
  • Submit Thread to Google
  • Submit Thread to Facebook
  • Submit Thread to My Yahoo!
  • Submit Thread to MySpace
  • Submit Thread to Twitter
  • Submit Thread to Reddit



Tags
basic, creating, esp
Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are Off
Pingbacks are Off
Refbacks are Off



All times are GMT +1. The time now is 04:44 PM.