Change camera angle

tumkin

New member
Joined
Oct 5, 2014
Messages
3
Reaction score
0
Hello, faced with such a problem. Unable to write to the address of the new value. But how to say, record it turns out, but apply these changes, it is impossible.
What I used, I used SAMP UDF (click to go to the source file).
And so, here is my function that I was trying to write:

newFunc(id) {
    if(!checkHandles())
        return false

    dwAddress := readDWORD(hGTA, dwSAMP + SAMP_INFO_OFFSET)
    if(ErrorLevel || dwAddress==0) {
        ErrorLevel := ERROR_READ_MEMORY
        return 0
    }

    dwAddress := readDWORD(hGTA, dwAddress + SAMP_PPOOLS_OFFSET)
    if(ErrorLevel || dwAddress==0) {
        ErrorLevel := ERROR_READ_MEMORY
        return 0
    }

    dwAddress := readDWORD(hGTA, dwAddress + SAMP_PPOOL_PLAYER_OFFSET)
    if(ErrorLevel || dwPlayers==0) {
        ErrorLevel := ERROR_READ_MEMORY
        return 0
    }

    dwLocalPlayer := readDWORD(hGTA, dwAddress + 0x22)
    if(ErrorLevel || dwPlayers==0) {
        ErrorLevel := ERROR_READ_MEMORY
        return 0
    }

    PlayerAnimID := readMem(hGTA, dwLocalPlayer + 4, 2)
    if(ErrorLevel || dwPlayers==0) {
        ErrorLevel := ERROR_READ_MEMORY
        return -1
    }

    stOnFootData1 := ReadFloat(hGTA, dwLocalPlayer + 233 + id)
    if(ErrorLevel || dwPlayers==0) {
        ErrorLevel := ERROR_READ_MEMORY
        return -2
    }

    dwFunc := dwLocalPlayer + 233 + 5
}

dwFunc - float cos or sin angle (0 to 1)

Just do not get to apply these changes. Maybe someone has an idea of how it all burn, source code SAMP UDF put up so you can see how that works.
Now about the address:
Address contains a value between 0 and 1 and type FLOAT
If you need further information, please ask, I will try to answer what I know.

Excuse me for my English, because I'm from Belarus :)

LINK SAMP UDF: https://github.com/SAMP-UDF/SAMP-UDF-fo ... r/SAMP.ahk
 
Top