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;
pFont = SF->getRender()->CreateNewFont("Tahoma", 12, FCR_BORDER);
SF->getRender()->registerD3DCallback(eDirect3DDeviceMethods::D3DMETHOD_PRESENT, Present);
if (SF->getGame()->isKeyPressed(VK_F12))
{
SF->getSAMP()->getChat()->AddChatMessage(-1, "1");
}
init = true;
}
}