c# bool with many options code example

Example 1: private bool MinimapAutoSpot bf4

private bool MinimapAutoSpot(Int64 pOtherSoldier, GPlayer enimyPlayer)        {             if (!localPlayer.CurrentWeapon.IsValid() || (int)localPlayer.CurrentWeapon.Slot >= 2 || localPlayer.IsDead() || localPlayer.InVehicle)                return false;             Int64 pSpottingTarget = RPM.ReadInt64(pOtherSoldier + Offsets.PZ_ClientSoldierEntity.m_pSpottingTargetComponentData);            if (!RPM.IsValid(pSpottingTarget))                return false;             Int32 spotType = RPM.ReadInt32(pSpottingTarget + Offsets.PZ_SpottingTargetComponentData.m_spotType);            if (bAutoSpot)            {                if (spotType == (int)Offsets.PZ_SpottingTargetComponentData.SpotType.SpotType_None)                {                     if (RPM.ReadInt32(pSpottingTarget + Offsets.PZ_SpottingTargetComponentData.m_spotType) == (int)Offsets.PZ_SpottingTargetComponentData.SpotType.SpotType_Active)                        return true;                 if (RPM.ReadInt32(pSpottingTarget + Offsets.PZ_SpottingTargetComponentData.m_spotType) == (int)Offsets.PZ_SpottingTargetComponentData.SpotType.SpotType_None)                    RPM.WriteInt32(pSpottingTarget + Offsets.PZ_SpottingTargetComponentData.m_spotType, (int)Offsets.PZ_SpottingTargetComponentData.SpotType.SpotType_Active);                }            }             else            {                if (spotType == (int)Offsets.PZ_SpottingTargetComponentData.SpotType.SpotType_Active)                {                    if (RPM.ReadInt32(pSpottingTarget + Offsets.PZ_SpottingTargetComponentData.m_spotType) == (int)Offsets.PZ_SpottingTargetComponentData.SpotType.SpotType_None)                        return true;                     if (RPM.ReadInt32(pSpottingTarget + Offsets.PZ_SpottingTargetComponentData.m_spotType) == (int)Offsets.PZ_SpottingTargetComponentData.SpotType.SpotType_Active)                        RPM.WriteInt32(pSpottingTarget + Offsets.PZ_SpottingTargetComponentData.m_spotType, (int)Offsets.PZ_SpottingTargetComponentData.SpotType.SpotType_None);                }            }            return false;        }

Example 2: private bool MinimapAutoSpot bf4

ReadProcessMemory(hProcess, (LPCVOID)(onlinePlayer + 0x14D0), &oClientSoldier, sizeof(DWORD_PTR), NULL);		if (!IsValid(oClientSoldier));		cout << "oClientSoldier = 0x" << hex << oClientSoldier << endl;		// I read shit		ReadProcessMemory(hProcess, (LPCVOID)(oClientSoldier + 0xBF0), &spottingTargetComponentData, sizeof(DWORD_PTR), NULL);		if (!IsValid(spottingTargetComponentData));		cout << "spottingTargetComponentData = 0x" << hex << spottingTargetComponentData << endl;		cout << "spottingTargetComponentData = " << dec << spottingTargetComponentData << endl; 		ReadProcessMemory(hProcess, (LPCVOID)(spottingTargetComponentData + 0x50), &spotType, sizeof(int), NULL);		cout << "spotType = 0x" << hex << spotType << endl << endl;