I'm looking for C++ help with virtual key combination, I'm looking for a simple key combination to do a action. I'm trying to get Shift+G to work. I've tried what I know and it's given me different results but nothing what I'm trying to do.
if (VK_SHIFT & 0x47) // Shift+G test
{
if(::GetKeyState(0x47)<0);
{
CBaseItem* pItemInfo = g_pItemTableHash->GetData(
g_pMainPlayer->m_pInv_Guardian[0].GetID());
if (GUARDIAN_ITEM_TYPE_ADULT == pItemInfo->BaseItem_Guardian.bType)
{
if(CUserInterface::GetInstance()->m_bGuardian==FALSE)
{
// ON //
CTDS_DUNGEON_CALLGARDIAN CallGuardinan;
CallGuardinan.bZipCode = 0;
g_pNet->SendMsg( (char*)&CallGuardinan, CallGuardinan.GetPacketSize(),
SERVER_INDEX_ZONE);
}
}
}
}
all that really matters is the first line, any one know how I can fix this so key combination SHIFT+G works?