P
pa0neix
Guest
How i can check if samp available (Address??, Offsets??)
Code:
#include "main.h"
DWORD g_dwSAMP_Addr = NULL;
void LoadSAMP()
{
while (g_dwSAMP_Addr == NULL)
{
g_dwSAMP_Addr = (DWORD)GetModuleHandle("samp.dll");
sleep(250);
}
}
void CheckSAMP()
{
while (/* How to check if samp available ??? */)
{
// Codes...
sleep(250);
}
}
void main()
{
LoadSAMP();
while (true)
{
GAME.GTA_SA.SetPlayerPos(0, 0, 0);
sleep(25);
}
}
BOOL WINAPI DllMain(HMODULE hDll, DWORD dwReason, LPVOID lpReserved)
{
DisableThreadLibraryCalls(hDll);
if (dwReason == DLL_PROCESS_ATTACH)
CreateThread(NULL, NULL, (LPTHREAD_START_ROUTINE)main, NULL, NULL, NULL);
return TRUE;
}