Helpgetting my weapon internal troubles

Posts 1–2 of 2 · Page 1 of 1
getting my weapon internal troubles
if i cout MyPlayer.WeaponID in Debug console, the game is crashing. what i am doing wrong?(internal)
Code:
int MyPlayer::weapon_index()
{
	DWORD local = this->Base();
	if (!local)
		return 0;
	else return *(int*)((local + Offsets::dwActiveWeapon) & 0xFFF);
}

int MyPlayer::weapon_entity()
{
	int weaponidx = this->weapon_index();
	if (!weaponidx)
		return 0;
	else return *(int*)((ClientDLL + Offsets::dwEntity + weaponidx * 0x10) - 0x10);
}

int MyPlayer::weaponID()
{
	int weaponentity = this->weapon_entity();
	if (!weaponentity)
		return 0;
	else return *(int*)(weaponentity + Offsets::dwItemDefinition);
}
Quote Originally Posted by s0m8t View Post
if i cout MyPlayer.WeaponID in Debug console, the game is crashing. what i am doing wrong?(internal)
Code:
int MyPlayer::weapon_index()
{
	DWORD local = this->Base();
	if (!local)
		return 0;
	else return *(int*)((local + Offsets::dwActiveWeapon) & 0xFFF);
}

int MyPlayer::weapon_entity()
{
	int weaponidx = this->weapon_index();
	if (!weaponidx)
		return 0;
	else return *(int*)((ClientDLL + Offsets::dwEntity + weaponidx * 0x10) - 0x10);
}

int MyPlayer::weaponID()
{
	int weaponentity = this->weapon_entity();
	if (!weaponentity)
		return 0;
	else return *(int*)(weaponentity + Offsets::dwItemDefinition);
}
Also struggeling with the same btw, so if i find a solution, i'll hook u up.
Posts 1–2 of 2 · Page 1 of 1

Post a Reply

Similar Threads

Tags for this Thread

None

Talk with us