2021-01-07 16:07:45 -05:00
|
|
|
#include "plugin.h"
|
2021-02-15 03:49:01 -05:00
|
|
|
#include "CHud.h"
|
2021-01-07 16:07:45 -05:00
|
|
|
|
|
|
|
using namespace plugin;
|
|
|
|
|
2021-02-15 03:49:01 -05:00
|
|
|
void DoStuff();
|
|
|
|
|
2021-01-07 16:07:45 -05:00
|
|
|
class Test
|
|
|
|
{
|
|
|
|
public:
|
2021-02-15 03:49:01 -05:00
|
|
|
|
2021-01-07 16:07:45 -05:00
|
|
|
Test()
|
2021-01-09 15:06:53 -05:00
|
|
|
{
|
2021-02-15 03:49:01 -05:00
|
|
|
Events::processScriptsEvent += DoStuff;
|
|
|
|
}
|
|
|
|
~Test()
|
|
|
|
{
|
|
|
|
Events::processScriptsEvent -= DoStuff;
|
2021-01-07 16:07:45 -05:00
|
|
|
}
|
|
|
|
} test;
|
|
|
|
|
2021-02-15 03:49:01 -05:00
|
|
|
void DoStuff()
|
|
|
|
{
|
|
|
|
CHud::SetMessage((char*)"Test");
|
|
|
|
|
|
|
|
if (KeyPressed(VK_TAB))
|
|
|
|
{
|
|
|
|
test.~Test();
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|