CLEO Help Checkpoint ID, coordinates.

CLEO related
Status
Not open for further replies.

amagedron156

Active member
Joined
Jan 28, 2015
Messages
37
Reaction score
1
Is it possible to catch a specific checkpoint and it's ID if they even exist, and be able to spawn that specific checkpoint. Also, is it possible to change the coordinates on a possition on the map, like switch them up a little bit in a tool, with a cleo mod or whatever? Thank you.
 

ItsRobinson

Active member
Joined
Nov 16, 2017
Messages
105
Reaction score
20
What happens when you walk into a checkpoint is controlled server-side.

So if you're asking if you could do whatever happens server-side when walking into a checkpoint, with a cleo. Then the answer is no.

All you can do is return the checkpoint ID and return the checkpoint position.

The ID, I don't know what you would use that for :thinking:
But the position will allow you to recreate the checkpoint
 

amagedron156

Active member
Joined
Jan 28, 2015
Messages
37
Reaction score
1
I was thinking more of changing coordinates on a map, cause when a server sided job sends me packets to where a checkpoint would spawn for example X Y Z, 1 2 3, and i switch up (if possible) the coordinates of that spot with another one on the map, so i change 5 3 2 to be 1 2 3. Also if i could recreate a job checkpoint and make it switch the position, that is the purpuse kinda here.
 

ItsRobinson

Active member
Joined
Nov 16, 2017
Messages
105
Reaction score
20
My bad, you can't return an ID, there is only ever 1 checkpoint on the map at anyone time, you can't create 2 checkpoints at the sametime.

PHP:
//Credits to Springfield and 0B36 for the 2 scm funcs
//http://ugbase.eu/index.php?threads/snippet-sa-mp-checkpoints.10260/post-72843
:is_cp_active
{
    0AB1: @is_cp_active 0 //returns true or false
}
IF 0AA2: 0@ = loadlib "samp.dll"
THEN 0A8E: 1@ = 0@ + 0x21A10C
    0A8D: 1@ = readMem 1@ sz 4 vp 0
    1@ += 0x24
    0A8D: 1@ = readMem 1@ sz 4 vp 0
    IF 1@ == TRUE
    THEN 0485:  return_true
    ELSE 059A:  return_false
    END
    0AA3: freelib 0@
END
0AB2: ret 0

:get_cp_pos
{
    0AB1: @get_cp_pos 0 return_to 0@ 1@ 2@
}
IF 0AA2: 0@ = loadlib "samp.dll"
THEN 0A8E: 1@ = 0@ + 0x21A10C
    0A8D: 1@ = readMem 1@ sz 4 vp 0
    1@ += 0xC
    0A8D: 2@ = readMem 1@ sz 4 vp 0
    1@ += 0x4
    0A8D: 3@ = readMem 1@ sz 4 vp 0
    1@ += 0x4
    0A8D: 4@ = readMem 1@ sz 4 vp 0
    0AA3: freelib 0@
END
0AB2: ret 3 2@ 3@ 4@

Top scm func will return true or false if the checkpoint is active, second scm func get the position of the active checkpoint.

You won't be able to move the checkpoint, you'll just be able to remake the checkpoint, but that checkpoint will only be client-side, it won't do anything server-side.
 
Status
Not open for further replies.
Top