[SNIPPET] Checkpoint/Red marker coordinates

In case if you enter an interior with a checkpoint inside it, you have to disable the marker before exit, otherwise the coords will freeze on the checkpoint from interior until you disable it. It works well only if there is maximum one checkpoint at once and if there's a small delay between the update of its location. Works well on RP server with player radar markers disabled, didn't test it on any server with enabled ones.

Code:
0A8D: 0@ = read_memory 0x00C7E018 size 4 virtual_protect 0  
0@ += 0x30                                                 
0A8D: 0@ = read_memory 1@ size 4 virtual_protect 0        
0A8D: 1@ = read_memory 0x00C7E018 size 4 virtual_protect 0  
1@ += 0x34                                                
0A8D: 1@ = read_memory 1@ size 4 virtual_protect 0        
0A8D: 2@ = read_memory 0x00C7E018 size 4 virtual_protect 0  
2@ += 0x38                                                 
0A8D: 2@ = read_memory 2@ size 4 virtual_protect 0

0@ stands for X
1@ stands for Y
2@ stands for Z
 

PopandaulX

Active member
Joined
Jul 15, 2013
Messages
189
Reaction score
1
Re: Checkpoint/Red marker coordinates

But there are 32 markers :| Which ones does this get?
for 0@ = 0 to 31
0@ *= 0xA0
0@ += 0xC7DD58
0@ += 0x30
0A8D: 1@ = read_memory 0@ size 4 virtual_protect 0
0@ += 0x4
0A8D: 2@ = read_memory 0@ size 4 virtual_protect 0
end
 

alesu

Member
Joined
Apr 19, 2013
Messages
21
Reaction score
0
Re: Checkpoint/Red marker coordinates

Actually, this shit will get all active checkpoints' coordinates:
Code:
for 31@ = 0 to 31
    24@ = 0xA0
    006a: 24@ *= 31@
    24@ += 0xC7DD58
    24@ += 0x30
    0a8d: 30@ 24@ 4 0 // x_coords
    24@ += 0x4
    0a8d: 29@ 24@ 4 0 // y_coords
    24@ += 0x4
    0a8d: 28@ 24@ 4 0 // z_coords
    24@ += 0x1A
    0a8d: 27@ 24@ 1 0 // cp is used
    if 27@ == 1
    then 0af8: "cp %d; x_coords - %f; y_coords - %f; z_coords - %f;" -1 31@ 30@ 29@ 28@
    end
end
And also will print them on chat.

This will get the first active checkpoint's coordinates, skipping the ones from stadiums:
Code:
0ab1: @cp_marker 0 x_coords 1@ y_coords 2@ z_coords 3@
:cp_marker
for 31@ = 0 to 31
    24@ = 0xA0
    006a: 24@ *= 31@
    24@ += 0xC7DD58
    24@ += 0x30
    0a8d: 30@ 24@ 4 0
    24@ += 0x4
    0a8d: 29@ 24@ 4 0
    24@ += 0x4
    0a8d: 28@ 24@ 4 0
    24@ += 0x1A
    0a8d: 27@ 24@ 1 0
    if 27@ == 1
    then
    if and
        8043: 30@ == 1099.551025
        8043: 29@ == 1601.496948
        8043: 28@ == 11.555000
        8043: 30@ == 2695.624023
        8043: 29@ == -1704.687988
        8043: 28@ == 10.844000
    then
        BREAK
    end
    end
end
if 27@ == 1
then 0485: checkpoint_active
else 059A: checkpoint_notactive
end
0ab2: 3 30@ 29@ 28@
 

monday

Expert
Joined
Jun 23, 2014
Messages
1,127
Solutions
1
Reaction score
158
Re: Checkpoint/Red marker coordinates

[member=3582]PopandaulX[/member]
It gets active checkpoint or the first one, I don't know. I found it by cheat engine in order to make auto teleport for trucker job on RP server and it works well. I tested it on other servers with red markers jobs and it works there too so i thought I will share.

Here's a video of how it works:
http://videobam.com/HArbg
 
Top