DWORD SampDLL = (DWORD)GetModuleHandleA("samp.dll");
if(SampDLL)
{
for(;;)
{
pInfo = (DWORD*)(SampDLL+SAMP_INFO);
pPools = (DWORD*)(*pInfo + SAMP_POOLS);
pPlayerPool = (DWORD*)(*pPools + 24);
pRemotePlayer = (DWORD*)(*pPlayerPool + 46);
pRemotePlayerData = (DWORD*)(*pRemotePlayer + 0);
for(DWORD i = 0; i < 4016; i += 4)
{
iIsListed = *(DWORD*)(*pPlayerPool + 4062 + i);
if(iIsListed > 0x00)
{
Sleep(2);
//i is the offset of the active/listed player
pRemotePlayer = (DWORD*)(*pPlayerPool + 46 + i);
pRemotePlayerData = (DWORD*)(*pRemotePlayer + 0);
short id = *(short*)(*pRemotePlayerData + 171); //sPlayerID;//171
float x = *(float*)(*pRemotePlayerData + 123); //fOnFootPos[3];//123
float y = *(float*)(*pRemotePlayerData + 127);
float z = *(float*)(*pRemotePlayerData + 131);
int score = *(int*)(*pRemotePlayer + 36);
char buff[100];
sprintf_s(buff, "id: %d score: %d x:%f y:%f z:%f", id, score, x,y,z);
MessageBoxA(0, buff, "SAMP message", 0);
Sleep(300);
}
}
Sleep(3000);
}
}