mrpijus123 (10-31-2014)
Code://add this to your vec3 class. or to your physiycs class if you have one. or rewrite it and just add it to your hack //you will need a dotproduct function float Vec3::AimFloat(Vec3 &delta, const float &FOV) const { return asinf(this->dot(delta)) / FOV; } Code: //some pointers Vec3 Origin = GameRenderer->Singleton()->m_viewParams.firstPersonTransform.trans; Vec3 Left = GameRenderer->Singleton()->m_viewParams.firstPersonTransform.left; Vec3 Up = GameRenderer->Singleton()->m_viewParams.firstPersonTransform.up; Code: //the function itself BOOL Rotation() // Fragger aka dudeinberlin { float flYaw ,flPitch,flRoll; //TargetArray is the final target vector, this will differ for your hack. i store my targetvecs in an array, hence i can call this rotation function without any params. Vec3 dt = TargetArray() - Origin; //don't forget to norm the delta for the coming calculations dt.normalize(); if(MyPlayer->isInVehicle()) { flYaw = Left.AimFloat(dt,GameRenderer->Singleton()->m_viewParams.view.m_fovX / 2.0f); flPitch = Up.AimFloat(dt,GameRenderer->Singleton()->m_viewParams.view.m_fovX / 2.0f); flRoll = flYaw; //ya ya, how to now if your a jet or heli? search the ucforum //flVehicleSens is dynamic in my hack. best Results with a very low sens of 8.0 or lower if(bImaJet||bImAHeli) flInputAction[ConceptPitch] = -flPitch * flVehicleSens; else flInputAction[ConceptPitch] = flPitch * flVehicleSens; flInputAction[ConceptYaw] = flYaw * flVehicleSens; flInputAction[ConceptRoll] = flRoll* flVehicleSens; if(bFire) AutoFireLogic(); return TRUE; } else { //tada you should know this. } return FALSE; }
Last edited by Mayion; 10-26-2013 at 03:38 PM. Reason: Adding Code Tags
mrpijus123 (10-31-2014)
Put the code inUse [C o d e] ..... [/c od e] (Remove spaces) but thats for the source codeCode:here so it's perfect
Will this works if i just open a new empty file,copy - paste the code and save it as a dll?
Pretty old ,but thanks for share.
what do u mean i dint understand whats is this code all about plz tell me how to make it work.
This is how Dll files are created.
You need to learn C++ First and understand how to code, then you will know how to use that source code
cplusplus.com - The C++ Resources Network << This site will help you to get started at C++.
Also you could check programming section of MPGH there you will find many tutorials will help you as well..
C++/C Programming - MPGH - MultiPlayer Game Hacking & Cheats - Hacks, Cheats, Downloads, Trainers, Games
I do not use any type of messenger outside of MPGH.
Inactive but you can reach me through VM/PM.
Code:float Vec3::AimFloat(Vec3 &delta, const float &FOV) const { return asinf(this->dot(delta)) / FOV; } Code: //some pointers Vec3 Origin = GameRenderer->Singleton()->m_viewParams.firstPersonTransform.trans; Vec3 Left = GameRenderer->Singleton()->m_viewParams.firstPersonTransform.left; Vec3 Up = GameRenderer->Singleton()->m_viewParams.firstPersonTransform.up; Code: //the function itself BOOL Rotation() // Fragger aka dudeinberlin { float flYaw ,flPitch,flRoll; //TargetArray is the final target vector, this will differ for your hack. i store my targetvecs in an array, hence i can call this rotation function without any params. Vec3 dt = TargetArray() - Origin; //don't forget to norm the delta for the coming calculations dt.normalize(); if(MyPlayer->isInVehicle()) { flYaw = Left.AimFloat(dt,GameRenderer->Singleton()->m_viewParams.view.m_fovX / 2.0f); flPitch = Up.AimFloat(dt,GameRenderer->Singleton()->m_viewParams.view.m_fovX / 2.0f); flRoll = flYaw; //ya ya, how to now if your a jet or heli? search the ucforum //flVehicleSens is dynamic in my hack. best Results with a very low sens of 8.0 or lower if(bImaJet||bImAHeli) flInputAction[ConceptPitch] = -flPitch * flVehicleSens; else flInputAction[ConceptPitch] = flPitch * flVehicleSens; flInputAction[ConceptYaw] = flYaw * flVehicleSens; flInputAction[ConceptRoll] = flRoll* flVehicleSens; if(bFire) AutoFireLogic(); return TRUE; } else { //tada you should know this. } return FALSE; }
you forgot to mention that this is dudeinberlin's code