CLEO Help need help - checkpoint sync

CLEO related
Status
Not open for further replies.

davidel

Well-known member
Joined
Jan 17, 2020
Messages
207
Reaction score
7
Location
Germania
Code:
{$CLEO .cs}

THREAD 'ExamenTP'
            
0662: printstring "By Zin"
0662: printstring "UGBASE.EU"
REPEAT
    WAIT 0
UNTIL 0AFA:

0B34: samp register_client_command "goboy" to_label @EXAMEN

WHILE TRUE
WAIT 0   
if 31@ == TRUE
then
if     
    0AB1: @is_cp_active 0
then
    0AB1: @get_cp_pos 0 1@ 2@ 3@     
        call @SendInCarDataSync 3 1@ 2@ 3@
    end   
end 
end

    

:is_cp_active
0AA2: 0@ = loadlib "samp.dll"
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@
0AB2: ret 0

:get_cp_pos
0AA2: 0@ = loadlib "samp.dll"
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@
0AB2: ret 3 2@ 3@ 4@

:SendInCarDataSync                 
3@ = SAMP.GetSAMPPlayerIDByActorHandle($PLAYER_ACTOR)
3@ = SAMP.GetPlayerStruct(3@)
3@ += 170
0AC8: 4@ = allocate_memory_size 63
0C10: memcpy destination 4@ source 3@ size 63
0C0D: struct 4@ offset 24 size 4 = 0@
0C0D: struct 4@ offset 28 size 4 = 1@
0C0D: struct 4@ offset 32 size 4 = 2@
0B3D: raknet 5@ = new_bit_stream
RakNet.Write(5@, 200, BS_TYPE_BYTE, 1)
RakNet.Write(5@, 4@, BS_TYPE_ARRAY, 63)
0B8B: raknet send bit_stream 5@                 
0B3E: raknet delete_bit_stream 5@
0AC9: 4@
0AB2: ret 0
:EXAMEN
0B12: 31@ = 31@ XOR 1
SAMP.CmdRet()
the script will teleport you into the checkpoint without moving / actually being on the checkpoint. [checkpoint sync, you know]

i have this checkpoint sync but i have the following problem:
Normally, when you teleport into a checkpoint with a vehicle it is ok. But if you teleport into a checkpoint with a vehicle and you go immediately to another location you will get banned.
What i need to modify is after he reached the checkpoint, wait 100ms and go back to initial position
I don't know how to explain ..
Basically, the script teleports you to the checkpoint and immediately returns to your current location, but without teleporting you. I need you to put "wait 100" before returning to the current location because then it doesn't ban me anymore.
thank you and sorry for this shit explanation, i hope u guys understand
 

⪻Chucky⪼

Member
Joined
Jun 10, 2020
Messages
11
Reaction score
1
Location
argentina
maybe it works xd


{$CLEO .cs}

THREAD 'ExamenTP'

0662: printstring "By Zin"
0662: printstring "UGBASE.EU"
REPEAT
WAIT 0
UNTIL 0AFA:

0B34: samp register_client_command "goboy" to_label @EXAMEN

WHILE TRUE
WAIT 0
if 31@ == TRUE
then
if
0AB1: @is_cp_active 0
then
SAMP.WriteSAMPMemory(16864, 195, 1)
SAMP.WriteSAMPMemory(24896, 195, 1)
SAMP.WriteSAMPMemory(18480, 195, 1)
SAMP.WriteSAMPMemory(82384, 50064, 2)
0AB1: @get_cp_pos 0 1@ 2@ 3@
call @SendInCarDataSync 3 1@ 2@ 3@
wait 100
SAMP.WriteSAMPMemory(16864, 20@, 1)
SAMP.WriteSAMPMemory(24896, 21@, 1)
SAMP.WriteSAMPMemory(18480, 22@, 1)
SAMP.WriteSAMPMemory(82384, 23@, 2)
end
end
end



:is_cp_active
0AA2: 0@ = loadlib "samp.dll"
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@
0AB2: ret 0

:get_cp_pos
0AA2: 0@ = loadlib "samp.dll"
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@
0AB2: ret 3 2@ 3@ 4@

:SendInCarDataSync
3@ = SAMP.GetSAMPPlayerIDByActorHandle($PLAYER_ACTOR)
3@ = SAMP.GetPlayerStruct(3@)
3@ += 170
0AC8: 4@ = allocate_memory_size 63
0C10: memcpy destination 4@ source 3@ size 63
0C0D: struct 4@ offset 24 size 4 = 0@
0C0D: struct 4@ offset 28 size 4 = 1@
0C0D: struct 4@ offset 32 size 4 = 2@
0B3D: raknet 5@ = new_bit_stream
RakNet.Write(5@, 200, BS_TYPE_BYTE, 1)
RakNet.Write(5@, 4@, BS_TYPE_ARRAY, 63)
0B8B: raknet send bit_stream 5@
0B3E: raknet delete_bit_stream 5@
0AC9: 4@
0AB2: ret 0
:EXAMEN
0B12: 31@ = 31@ XOR 1
SAMP.CmdRet()
 

davidel

Well-known member
Joined
Jan 17, 2020
Messages
207
Reaction score
7
Location
Germania
maybe it works xd


{$CLEO .cs}

THREAD 'ExamenTP'

0662: printstring "By Zin"
0662: printstring "UGBASE.EU"
REPEAT
WAIT 0
UNTIL 0AFA:

0B34: samp register_client_command "goboy" to_label @EXAMEN

WHILE TRUE
WAIT 0
if 31@ == TRUE
then
if
0AB1: @is_cp_active 0
then
SAMP.WriteSAMPMemory(16864, 195, 1)
SAMP.WriteSAMPMemory(24896, 195, 1)
SAMP.WriteSAMPMemory(18480, 195, 1)
SAMP.WriteSAMPMemory(82384, 50064, 2)
0AB1: @get_cp_pos 0 1@ 2@ 3@
call @SendInCarDataSync 3 1@ 2@ 3@
wait 100
SAMP.WriteSAMPMemory(16864, 20@, 1)
SAMP.WriteSAMPMemory(24896, 21@, 1)
SAMP.WriteSAMPMemory(18480, 22@, 1)
SAMP.WriteSAMPMemory(82384, 23@, 2)
end
end
end



:is_cp_active
0AA2: 0@ = loadlib "samp.dll"
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@
0AB2: ret 0

:get_cp_pos
0AA2: 0@ = loadlib "samp.dll"
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@
0AB2: ret 3 2@ 3@ 4@

:SendInCarDataSync
3@ = SAMP.GetSAMPPlayerIDByActorHandle($PLAYER_ACTOR)
3@ = SAMP.GetPlayerStruct(3@)
3@ += 170
0AC8: 4@ = allocate_memory_size 63
0C10: memcpy destination 4@ source 3@ size 63
0C0D: struct 4@ offset 24 size 4 = 0@
0C0D: struct 4@ offset 28 size 4 = 1@
0C0D: struct 4@ offset 32 size 4 = 2@
0B3D: raknet 5@ = new_bit_stream
RakNet.Write(5@, 200, BS_TYPE_BYTE, 1)
RakNet.Write(5@, 4@, BS_TYPE_ARRAY, 63)
0B8B: raknet send bit_stream 5@
0B3E: raknet delete_bit_stream 5@
0AC9: 4@
0AB2: ret 0
:EXAMEN
0B12: 31@ = 31@ XOR 1
SAMP.CmdRet()
no.. it's not
:SendInCarDataSync here need to modify i think
the problem is that when i go to reach the checkpoint, after the checkpoint was reached the script returns the char too fast in the initial position. i need after i reach the checkpoint to wait a couple of seconds before return to initial position.. but i dont know how to do it because i am pretty bad at cleo, this is advanced stuff, i tried but nothing works
 

Pichichu

New member
Joined
Mar 28, 2020
Messages
1
Reaction score
0
Location
Brasil
no.. it's not
:SendInCarDataSync here need to modify i think
the problem is that when i go to reach the checkpoint, after the checkpoint was reached the script returns the char too fast in the initial position. i need after i reach the checkpoint to wait a couple of seconds before return to initial position.. but i dont know how to do it because i am pretty bad at cleo, this is advanced stuff, i tried but nothing works
But have you tried it? it returns you to your position because you are sending double packets, you must lock the data in the car and send the fake packets
 
Status
Not open for further replies.
Top