ASI/DLL Help RakClientInterface and stSAMP

qICEp

Member
Joined
Oct 5, 2014
Messages
15
Reaction score
0
Hey folks, im trying to get my ASI working on all 0.3.7 versions but im failing at it. Basically i used some ASI-Framework library but it only supports 0.3.7 R1 client.
I found SAMP_INFO_OFFSET and few other that i needed for every version of samp client. And figured it would work, but no. Right now im stuck on R3 (its probably the same for every other version).

I have these:

Code:
        g_SAMP = *(stSAMP **) (dwSAMPAddr + SAMP_INFO_OFFSET);
        if (g_SAMP == nullptr)
        {
            MyFile << "Failed at g_SAMP!\n";
            return false;
        }
        //Some other stuff that passess...
        if (g_SAMP->pRakClientInterface == nullptr)
        {
            MyFile << "Failed at pRakClientInterface!\n";
            return false;
        }
It fails at pRakClientInterface pointer
And here is that stSAMP structure that should have that pRakClientInterface...
Please note, it works fine with R1.
Code:
struct stSAMP
{
    void                    *pUnk0;
    stServerInfo            *pServerInfo;
    uint8_t                    byteSpace[24];
    char                    szIP[257];
    char                    szHostname[259];
    bool                    bNametagStatus;
    uint32_t                ulPort;
    uint32_t                ulMapIcons[100];
    int                        iLanMode;
    int                        iGameState;
    uint32_t                ulConnectTick;
    struct stServerPresets    *pSettings;
    void                    *pRakClientInterface;
    struct stSAMPPools        *pPools;
};
So did structure get changed with R3 (or with R2)? Or why does it fail? Logic dictates if structure is the same, correct base offset and pRackClientInterface should work. Since i checked my SAMP_INFO_OFFSET with multiple other plugins/api's that support R3 my address should be correct.
For reference my SAMP_INFO_OFFSET
0x21A0F8 //R1
0x26E8DC //R3

Also im sure my client for testing is R3, i even dug out GetSampVersion somewhere and adapted to my code, it detects versions correctly and says R3 (plus when i connect it clearly says R3 in chat)
 

qICEp

Member
Joined
Oct 5, 2014
Messages
15
Reaction score
0
Sorry i cant see how to edit my first post, digging a bit more i found that stSAMP structure has changed, so now it makes sense why it fails...Next question is if someone has those new structures and is willing to share them?
 
Top