CLEO Help Help with Car Fake Speed Sync (problem with delay in RP Server)

CLEO related
Status
Not open for further replies.

(_)_)===D

Member
Joined
May 2, 2016
Messages
17
Reaction score
1
Im using the Snippet of 0B36 and everything works as it should be. I use it to avoid the speed limit that the RP server sets.

My problem is this: the code takes a while to pass throw the label, because when I activate the cleo, the speedometer shows 0 km (that's how i set it up)


but sometimes when I accelerate it continues showing 0 km, it sometimes shows the speed at which I would go without the Cleo and again goes down to 0km.


When that change occurs, the server detects my speed and stops the car abruptly and failed to completely avoid the speed limit.

All possible help is welcome
I will look for ways to thank and reward those who help me with this little problem.
First of all, Thanks

Code:
:Fake
wait 0
if
10@ == 1
jf @Fake
if
Actor.Driving($PLAYER_ACTOR)
jf @ERROR
0@ = Actor.CurrentCar($PLAYER_ACTOR)
4@ = SAMP.GetSAMPVehicleIDByCarHandle(0@)
00AA: store_car 0@ position_to 1@ 2@ 3@
call @SendIncarFakeSpeedSync 4 1@ 2@ 3@ 4@  // 1@ 2@ 3@ are the positions and 4@ being the vehicle id
goto @Fake

:SendIncarFakeSpeedSync
4@ = SAMP.GetSAMPPlayerIDByActorHandle($PLAYER_ACTOR)
4@ = SAMP.GetPlayerStruct(4@)
4@ += 170
0AC8: 5@ = allocate_memory_size 63
0C10: memcpy destination 5@ source 4@ size 63
0C0D: struct 5@ offset 36 size 4 = 0.0
0C0D: struct 5@ offset 40 size 4 = 0.0 // Speed multiplier (Speedometer shows 0 km)
0C0D: struct 5@ offset 44 size 4 = 0.0
0B3D: raknet 6@ = new_bit_stream
0B40: raknet bit_stream 6@ write 200 type 0 size 1
0B40: raknet bit_stream 6@ write 5@ type 5 size 63
0B42: raknet send bit_stream 6@ priority 1 reliability 7 ordering_channel 0
0B3E: raknet delete_bit_stream 6@
0AC9: free_allocated_memory 5@
0AB2: ret 0
 
Last edited:

Hidend

Expert
Joined
Mar 4, 2013
Messages
625
Reaction score
39
If I'm not wrong you had to stop sending your real car speed, send the fake speed while you want and when you are done, send the real car speed, to do so you had to find the NOP that sends the car speed and drop sending it
 
Status
Not open for further replies.
Top