Thread: Private Data
View Single Post
Geesu
Veteran Member
Join Date: Mar 2004
Location: Cincinnati, OH
Old 12-20-2004 , 12:12  
Reply With Quote #11

It's weird this actually doesn't work

Code:
void CPlayer::set_user_defuser( bool bValue )
{
	int initialItem = *((int *)pEnt->GetUnknown() + OFFSET_ITEM);
	int initialIcon = *((int *)pEnt->GetUnknown() + OFFSET_ITEM_ICON);

	if( bValue )
	{
		*((int *)pEnt->GetUnknown() + OFFSET_ITEM) &= (1<<0);
		*((int *)pEnt->GetUnknown() + OFFSET_ITEM_ICON) &= (1<<0);
	}
	else
	{
		*((int *)pEnt->GetUnknown() + OFFSET_ITEM) &= ~(1<<0);
		*((int *)pEnt->GetUnknown() + OFFSET_ITEM_ICON) &= ~(1<<0);
	}
}
But it I change the &= to = then it works, but that is basically erasing other data that is in that offset
__________________
Need war3ft help? DO NOT PM ME... Check the forums
Geesu is offline
Send a message via AIM to Geesu Send a message via MSN to Geesu