CLEO Help NOP PACKET_VEHICLE_SYNC

CLEO related

cheetahftw1

Active member
Joined
Aug 31, 2018
Messages
39
Reaction score
0
Hi, I need a mod that when is online will stop sending packets to the server with my location in car until I turn it off. For example I am in a car and I wanna teleport in other 2 cars then back to initial vehicle, If I turn the mod on when I teleport in the 2 vehicles and then I get back to the one I started it, the server doesn't detect it and I don't send warnings to the server. I tried some stuff but I don't really know how to nop it.
 

ajom

Well-known member
Joined
Apr 14, 2020
Messages
389
Solutions
2
Reaction score
268
Location
Pluto
One way to do it is by monitoring both Outcoming(Uploading) RPCs and Packets:
PHP:
{$CLEO}
0000:

const
    SYNCSTATE = 31@
end

repeat
    wait 0
until 0AFA: is_samp_available

SYNCSTATE = true

0B34: samp register_client_command "tsync" to_label @togglesync

0BE1: raknet setup_outcoming_rpc_hook @syncmanager
0BE2: raknet setup_outcoming_packet_hook @syncmanager

0BDE: pause_thread 0

:togglesync
    0B19: SYNCSTATE ^= true
    if SYNCSTATE == true
    then 0AF8: samp add_message_to_chat "UpSync: Enabled!" color 0xFF00FF00
    else 0AF8: samp add_message_to_chat "UpSync: Disabled!" color 0xFFFF0000
    end
0B43: samp cmd_ret

:syncmanager
0BE0: raknet hook_ret SYNCSTATE

Type /tsync to toggle Sending RPCs and Packets.
 

blvck0v

Active member
Joined
Feb 23, 2019
Messages
97
Reaction score
51
Location
ugbase.eu
One way to do it is by monitoring both Outcoming(Uploading) RPCs and Packets:
PHP:
{$CLEO}
0000:

const
    SYNCSTATE = 31@
end

repeat
    wait 0
until 0AFA: is_samp_available

SYNCSTATE = true

0B34: samp register_client_command "tsync" to_label @togglesync

0BE1: raknet setup_outcoming_rpc_hook @syncmanager
0BE2: raknet setup_outcoming_packet_hook @syncmanager

0BDE: pause_thread 0

:togglesync
    0B19: SYNCSTATE ^= true
    if SYNCSTATE == true
    then 0AF8: samp add_message_to_chat "UpSync: Enabled!" color 0xFF00FF00
    else 0AF8: samp add_message_to_chat "UpSync: Disabled!" color 0xFFFF0000
    end
0B43: samp cmd_ret

:syncmanager
0BE0: raknet hook_ret SYNCSTATE

Type /tsync to toggle Sending RPCs and Packets.

Simple high quality and to the point code, always nice to see, a lot to learn from this.
Also, have you ever had problems with declaring constants before waiting for samp to load?
It's kind of a silly question because the constants should be tied to the script and not interfere, but none the less, at some point I was working on a code with some more constants declared some to variables some to constants, and the game used to crash.
After I moved the 'const end' after 'repeat until samp loaded' it stopped crashing.
 

cheetahftw1

Active member
Joined
Aug 31, 2018
Messages
39
Reaction score
0
One way to do it is by monitoring both Outcoming(Uploading) RPCs and Packets:
PHP:
{$CLEO}
0000:

const
    SYNCSTATE = 31@
end

repeat
    wait 0
until 0AFA: is_samp_available

SYNCSTATE = true

0B34: samp register_client_command "tsync" to_label @togglesync

0BE1: raknet setup_outcoming_rpc_hook @syncmanager
0BE2: raknet setup_outcoming_packet_hook @syncmanager

0BDE: pause_thread 0

:togglesync
    0B19: SYNCSTATE ^= true
    if SYNCSTATE == true
    then 0AF8: samp add_message_to_chat "UpSync: Enabled!" color 0xFF00FF00
    else 0AF8: samp add_message_to_chat "UpSync: Disabled!" color 0xFFFF0000
    end
0B43: samp cmd_ret

:syncmanager
0BE0: raknet hook_ret SYNCSTATE

Type /tsync to toggle Sending RPCs and Packets.
thanks, simple and working
 
Last edited:

ajom

Well-known member
Joined
Apr 14, 2020
Messages
389
Solutions
2
Reaction score
268
Location
Pluto
It's kind of a silly question because the constants should be tied to the script and not interfere, but none the less, at some point I was working on a code with some more constants declared some to variables some to constants, and the game used to crash.
After I moved the 'const end' after 'repeat until samp loaded' it stopped crashing.

I haven't experienced a const declaration causing the script to crash, due to the fact that it only serves as a keyword substitute during compilation.

You might as well try changing your Sanny Builder Settings into like this:
Settings > General
Settings > Formats
 

davidel

Well-known member
Joined
Jan 17, 2020
Messages
207
Reaction score
7
Location
Germania
One way to do it is by monitoring both Outcoming(Uploading) RPCs and Packets:
PHP:
{$CLEO}
0000:

const
    SYNCSTATE = 31@
end

repeat
    wait 0
until 0AFA: is_samp_available

SYNCSTATE = true

0B34: samp register_client_command "tsync" to_label @togglesync

0BE1: raknet setup_outcoming_rpc_hook @syncmanager
0BE2: raknet setup_outcoming_packet_hook @syncmanager

0BDE: pause_thread 0

:togglesync
    0B19: SYNCSTATE ^= true
    if SYNCSTATE == true
    then 0AF8: samp add_message_to_chat "UpSync: Enabled!" color 0xFF00FF00
    else 0AF8: samp add_message_to_chat "UpSync: Disabled!" color 0xFFFF0000
    end
0B43: samp cmd_ret

:syncmanager
0BE0: raknet hook_ret SYNCSTATE

Type /tsync to toggle Sending RPCs and Packets.
works with 0.3.7 R1? cleo 4.1? game stuck when i type /tsync, i use those who i mentioned
 
Top