Skip to content

Commit 19cfd81

Browse files
Update Test example for gta2
1 parent d7d4973 commit 19cfd81

File tree

3 files changed

+4
-2
lines changed

3 files changed

+4
-2
lines changed

examples/Test/Main.cpp

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,8 @@ struct Main
1818
{
1919
#if defined(GTA3) or defined(GTAVC) or defined(GTASA)
2020
CMessages::AddMessageJumpQ("Hello, world!", 500, 0);
21+
#elif defined (GTA2)
22+
GetHud()->m_HudMessage.SetHudMessage(L"Hello, world!", MESSAGE_DISPLAY_NOW);
2123
#endif
2224
}
2325
} gInstance;

plugin_II/game_II/CHud.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ void CHud::DrawSprite(int id1, int id2, int x, int y, char style, int const& mod
2929
plugin::CallStd<0x4C71B0, int, int, int, int, char, int const&, int, int, char>(id1, id2, x, y, style, mode, enableAlpha, alpha, unk);
3030
}
3131

32-
void CHudMessage::SetHudMessage(wchar_t* str, int priority) {
32+
void CHudMessage::SetHudMessage(const wchar_t* str, int priority) {
3333
plugin::CallMethod<0x4C6060>(this, str, priority);
3434
}
3535

plugin_II/game_II/CHud.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -66,7 +66,7 @@ class CHudMessage {
6666
int m_nType;
6767

6868
public:
69-
void SetHudMessage(wchar_t* str, int priority);
69+
void SetHudMessage(const wchar_t* str, int priority);
7070
};
7171

7272
VALIDATE_SIZE(CHudMessage, 0x1C8);

0 commit comments

Comments
 (0)