C++ Player Break Dance

_=Gigant=_

Well-Known Member
Joined
Mar 21, 2017
Messages
393
Likes
11
Points
23
#1
Code:
#define KEY_I 0x49
#define KEY_J 0x4A
#define KEY_K 0x4B
#define KEY_L 0x4C
#define KEY_O 0x4F
#define KEY_U 0x55


//float   brkdance_velocity;  //ini.h  =  1.0

void GTAfunc_Player_ApplyRotoryPulseAboutAnAxis(float fX, float fY, float fZ)
{
	struct actor_info *myinfo = actor_info_get(ACTOR_SELF, 0);
	if (myinfo)
	{
		DWORD dwFunc = 0x59C790;

		float fRotPtr[3];
		float *fpActorMatrix = myinfo->base.matrix;
		float *fpActorSpin = &myinfo->spin[0];
		float fFuncRet[3];

		fX *= 0.02000000f;
		fY *= 0.02000000f;
		fZ *= 0.02000000f;
		fRotPtr[0] = fX;
		fRotPtr[1] = fY;
		fRotPtr[2] = fZ;

		_asm
		{
			lea ecx, fRotPtr
			push ecx
			push fpActorMatrix
			lea edx, fFuncRet
			push edx
			call dwFunc
		}

		fpActorSpin[0] += fFuncRet[0];
		fpActorSpin[1] += fFuncRet[1];
		fpActorSpin[2] += fFuncRet[2];

		vect3_copy(fpActorSpin, fFuncRet);
	}
}

// define in .h   void GTAfunc_Player_ApplyRotoryPulseAboutAnAxis(float fX, float fY, float fZ);



void player_brakedance(struct actor_info *actor_info, float time_diff)
{

	traceLastFunc("player_brakedance()");

	static float	velpos, velneg;


	if (bPlayerBrkDance)
	{

		float	fTimeStep = *(float *)0xB7CB5C;

		velpos = set.brkdance_velocity * fTimeStep;
		velneg = -set.brkdance_velocity * fTimeStep;

		if (KEY_DOWN(KEY_I))
		{
			GTAfunc_Player_ApplyRotoryPulseAboutAnAxis(velneg, 0.0f, 0.0f);
		}
		else if (KEY_DOWN(KEY_K))
		{
			GTAfunc_Player_ApplyRotoryPulseAboutAnAxis(velpos, 0.0f, 0.0f);
		}
		else if (KEY_DOWN(KEY_L))
		{
			GTAfunc_Player_ApplyRotoryPulseAboutAnAxis(0.0f, velpos, 0.0f);
		}
		else if (KEY_DOWN(KEY_J))
		{
			GTAfunc_Player_ApplyRotoryPulseAboutAnAxis(0.0f, velneg, 0.0f);
		}
		else if (KEY_DOWN(KEY_O))
		{
			GTAfunc_Player_ApplyRotoryPulseAboutAnAxis(0.0f, 0.0f, velneg);
		}
		else if (KEY_DOWN(KEY_U))
		{
			GTAfunc_Player_ApplyRotoryPulseAboutAnAxis(0.0f, 0.0f, velpos);
		}
	}
}

// define in .h  void player_brakedance(struct actor_info *actor_info, float time_diff);
and players be like  WTF OMG HOW , HOW U DO THAT https://s33.postimg.cc/ax5l7kei7/sa-mp-298.png
 

user88

Well-Known Member
Joined
Jun 29, 2017
Messages
201
Likes
17
Points
23
Location
Afghanistan
#2
WTF that b1g hooke sorse, u might be c++ pro
U wanna pley minecrahh with me my best BEST friend?






Noise
 

0x32789

Well-Known Member
Joined
May 26, 2014
Messages
762
Likes
1
Points
68
Location
teknickal suprot
#5
WTF OMG HOW , HOW U DO THAT (2)

what server is u on i want hax0r 03dl yes?

title: c++ player break dance,
coding: player"Brake"dance
 
Top