bool CALLBACK HealthBar (CONST RECT *pSourceRect, CONST RECT *pDestRect, HWND hDestWindowOverride, CONST RGNDATA *pDirtyRegion)
{
if(SUCCEEDED(SF->getRender()->BeginRender()))
{
SF->getRender()->DrawBox(500, 500, 25, 25, D3DCOLOR_ARGB(255, 85, 170, 85));
SF->getRender()->EndRender();
}
return true;
}
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;
SF->getRender()->registerD3DCallback(eDirect3DDeviceMethods::D3DMETHOD_PRESENT, HealthBar);
init = true;
}
int &ChatMode = SF->getSAMP()->getChat()->iChatWindowMode;
if (ChatMode == 0);
// Останавливаем рендер.
SF->getRender()->SetRenderState(???);
else
// Продолжаем рендер.
SF->getRender()->SetRenderState(???);
}