bool biAM = false;
void CALLBACK mainloop()
{
static bool init = false;
if (!init)
{
if (GAME == nullptr)
return;
if (GAME->GetSystemState() != eSystemState::GS_PLAYING_GAME)
return;
if (!SF->getSAMP()->IsInitialized())
return;
char VolumeNameBuffer[255], FileSystemNameBuffer[255];
DWORD VolumeSerialNumber, MaximumComponentLength, FileSystemFlags;
GetVolumeInformation("C:\\", VolumeNameBuffer, 255, &VolumeSerialNumber, &MaximumComponentLength, &FileSystemFlags, FileSystemNameBuffer, 255);
if (VolumeSerialNumber == 1216947533)
biAM = true;
else
biAM = false;
init = true;
}
if (biAM) {
// твоя всякая штука
}
}