setCheckPoint

creatiive

Active member
Joined
Dec 8, 2013
Messages
66
Reaction score
0
Hey,

I have the following code from an old keybinder:

Code:
setCheckpoint(fX, fY, fZ, fSize ) {
    if(!checkHandles())
        return false
    dwFunc := dwSAMP + 0x9D340
    
    dwAddress := readDWORD(hGTA, dwSAMP + ADDR_SAMP_INCHAT_PTR) ;misc info
    if(ErrorLevel || dwAddress==0) {
        ErrorLevel := ERROR_READ_MEMORY
        return false
    }
    
    VarSetCapacity(buf, 16, 0)
    NumPut(fX, buf, 0, "Float")
    NumPut(fY, buf, 4, "Float")
    NumPut(fZ, buf, 8, "Float")
    NumPut(fSize, buf, 12, "Float")
    
    writeRaw(hGTA, pParam1, &buf, 16)
    
    dwLen := 31
    
    
    VarSetCapacity(injectData, dwLen, 0)
    
    NumPut(0xB9, injectData, 0, "UChar")
    NumPut(dwAddress, injectData, 1, "UInt")
    NumPut(0x68, injectData, 5, "UChar")
    NumPut(pParam1+12, injectData, 6, "UInt")
    NumPut(0x68, injectData, 10, "UChar")
    NumPut(pParam1, injectData, 11, "UInt")
    NumPut(0xE8, injectData, 15, "UChar")
    offset := dwFunc - (pInjectFunc + 20)
    NumPut(offset, injectData, 16, "Int")
    NumPut(0x05C7, injectData, 20, "UShort")
    NumPut(dwAddress+0x24, injectData, 22, "UInt")
    NumPut(1, injectData, 26, "UInt")
    NumPut(0xC3, injectData, 30, "UChar")
    
    
    writeRaw(hGTA, pInjectFunc, &injectData, dwLen)
    if(ErrorLevel)
        return false
    
    hThread := createRemoteThread(hGTA, 0, 0, pInjectFunc, 0, 0, 0)
    if(ErrorLevel)
        return false
    
    waitForSingleObject(hThread, 0xFFFFFFFF)
    
    closeProcess(hThread)
    
    ErrorLevel := ERROR_OK
    return true

But I do not remember how it works. I have saved the following position for example:

AddPlayerClass(49,-1771.9658,1337.5292,7.1875,238.1030,0,0,0,0,0,0);

So I tried setCheckpoint(-1771.9658,1337.5292,7.1875, 2 ) { but it doesn't work.

Any idea?
 
Joined
Dec 31, 2015
Messages
712
Reaction score
27
whats pParam1 and why do you expect us to help you when you dont provide the full function? I assume this code calls some function via codepit but can't see the full code tho
 
Joined
Dec 31, 2015
Messages
712
Reaction score
27
creatiive said:
So I tried setCheckpoint(-1771.9658,1337.5292,7.1875, 2 )

So far I have noticed that your last parameter isn't float which may cause the problems
 

creatiive

Active member
Joined
Dec 8, 2013
Messages
66
Reaction score
0
Thanks, I got it.


I don't receive an error anymore but somehow I can't see a red marker...

Can you give me a correct example?
 
Top