Другое SAMPFUNCS | API C++

LaRossa

Потрачен
429
117
Обратите внимание, пользователь заблокирован на форуме. Не рекомендуется проводить сделки.
Как получить какой скин у игрока ?
 

Frixen

Известный
131
8
Почему это
if (SF->getGame()->isKeyPressed(122))
{
SF->getSAMP()->getChat()->AddChatMessage(-1, "1");
}
не работает?
Нажимаю Ф12 и ничего не происходит
 

LaRossa

Потрачен
429
117
Обратите внимание, пользователь заблокирован на форуме. Не рекомендуется проводить сделки.
Почему это
if (SF->getGame()->isKeyPressed(122))
{
SF->getSAMP()->getChat()->AddChatMessage(-1, "1");
}
не работает?
Нажимаю Ф12 и ничего не происходит
C++:
        if (SF->getGame()->isKeyPressed(VK_F12))
        {
            SF->getSAMP()->getChat()->AddChatMessage(-1, "1");
        }
 

Frixen

Известный
131
8
Дай полный код
Код:
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;
    }
}
Удивительно, правда?)
 

LaRossa

Потрачен
429
117
Обратите внимание, пользователь заблокирован на форуме. Не рекомендуется проводить сделки.
Код:
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;
    }
}
Удивительно, правда?)
C++:
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);
        init = true;
    }

    if (SF->getGame()->isKeyPressed(VK_F12))
    {
        SF->getSAMP()->getChat()->AddChatMessage(-1, "1");
    }
}
 
  • Нравится
Реакции: Vlad Horii и Frixen