#include <Windows.h>
#include "main.h"
SAMPFUNCS *SF = new SAMPFUNCS();
void CALLBACK WHO_TEST(std::string params)
{
int iFormInt = 1;
SF->getSAMP()->getChat()->AddChatMessage(0xFFFFFF, "Command Worked %d", iFormInt);
}
void __stdcall mainloop()
{
static bool initialized = false;
if (!initialized)
{
if (GAME && GAME->GetSystemState() == eSystemState::GS_PLAYING_GAME && SF->getSAMP()->IsInitialized())
{
initialized = true;
SF->getSAMP()->getChat()->AddChatMessage(0xFFFFFF, "SAMPFUNCS Plugin loaded.");
SF->getSAMP()->registerChatCommand("who", WHO_TEST);
}
}
}
BOOL APIENTRY DllMain(HMODULE hModule, DWORD dwReasonForCall, LPVOID lpReserved)
{
if (dwReasonForCall == DLL_PROCESS_ATTACH)
SF->initPlugin(mainloop, hModule);
return TRUE;
}