CLEO Help disconnect snippet

CLEO related
Status
Not open for further replies.

Bloodriver the Conqueror

Active member
Joined
Mar 23, 2020
Messages
67
Reaction score
14
Location
Turkey
I'll test it later.
i also told you above. i already have this. but it doesn't work properly.
 

Bloodriver the Conqueror

Active member
Joined
Mar 23, 2020
Messages
67
Reaction score
14
Location
Turkey
dude, i don't know if you're reading what i wrote above, but this snippet doesn't work. i also did it for SAMP 0.3.7 R5(based on this snippet), but it doesn't work.

i know you're trying to help, but it's not working.

anyway, thanks.
@Parazitas please lock up the topic, if it needs to be moved somewhere, please move it.
 

dphome

Well-known member
Joined
Mar 21, 2020
Messages
457
Solutions
9
Reaction score
166
Location
Poland
I'll test it later.
 

dphome

Well-known member
Joined
Mar 21, 2020
Messages
457
Solutions
9
Reaction score
166
Location
Poland
Type "YY" to disconnect by quit.
Type "NN" to disconnect by timeout.
Snippet w/o 0.3.7-R5
PHP:
:SAMPDisconnectWithReason
{
    0AB1: @SAMPDisconnectWithReason 1 500
    or
    0AB1: @SAMPDisconnectWithReason 1 0    
}
IF 0AA2: 31@ = "samp.dll"
THEN
    0AB1: @get_samp_version_id 0 _returned: ID 17@     
    IF 17@ > 0
    THEN
        IF 17@ == 1 // 0.3.7 R1
        THEN 
            31@ += 0x21A0F8
            0A8D: 31@ readMem 31@ sz 4 vp 0
            31@ += 0x3C9    
            0A8D: 31@ readMem 31@ sz 4 vp 0
            0A8E: 30@ = 31@ + 0x0      
            0A8D: 30@ readMem 30@ sz 4 vp 0
            30@ += 0x8                 
            0A8D: 30@ readMem 30@ sz 4 vp 0
        END
        IF 17@ == 2 // 0.3.7 R2
        THEN
            31@ += 0x21A100
            0A8D: 31@ readMem 31@ sz 4 vp 0
            31@ += 0x18               
            0A8D: 31@ readMem 31@ sz 4 vp 0
            0A8E: 30@ = 31@ + 0x0      
            0A8D: 30@ readMem 30@ sz 4 vp 0
            30@ += 0x8                 
            0A8D: 30@ readMem 30@ sz 4 vp 0
        END
        
        IF 17@ == 3 // 0.3.DL
        THEN
            31@ += 0x2ACA24
            0A8D: 31@ readMem 31@ sz 4 vp 0
            31@ += 0x2C                  
            0A8D: 31@ readMem 31@ sz 4 vp 0
            0A8E: 30@ = 31@ + 0x0      
            0A8D: 30@ readMem 30@ sz 4 vp 0
            30@ += 0x8                 
            0A8D: 30@ readMem 30@ sz 4 vp 0
        END
        
        IF 17@ == 4 // 0.3.7 R3 
        THEN
            31@ += 0x26E8DC
            0A8D: 31@ readMem 31@ sz 4 vp 0
            31@ += 0x2C
            0A8D: 31@ readMem 31@ sz 4 vp 0
            0A8E: 30@ = 31@ + 0x0      
            0A8D: 30@ readMem 30@ sz 4 vp 0
            30@ += 0x8                 
            0A8D: 30@ readMem 30@ sz 4 vp 0
        END
        
        IF 17@ == 5 // 0.3.7 R4
        THEN
            31@ += 0x26EA0C
            0A8D: 31@ readMem 31@ sz 4 vp 0
            31@ += 0x2C                  
            0A8D: 31@ readMem 31@ sz 4 vp 0
            0A8E: 30@ = 31@ + 0x0      
            0A8D: 30@ readMem 30@ sz 4 vp 0
            30@ += 0x8                 
            0A8D: 30@ readMem 30@ sz 4 vp 0
        END
        
        IF 17@ == 6 // 0.3.7 R4 - v2
        THEN
            31@ += 0x26EA0C
            0A8D: 31@ readMem 31@ sz 4 vp 0
            31@ += 0x0                  
            0A8D: 31@ readMem 31@ sz 4 vp 0
            0A8E: 30@ = 31@ + 0x0      
            0A8D: 30@ readMem 30@ sz 4 vp 0
            30@ += 0x8                 
            0A8D: 30@ readMem 30@ sz 4 vp 0
        END
        
        IF 17@ == 7 // 0.3.7 R5
        THEN
            // NOT FOUND
        END
        0AA6: call 30@ struct 31@ num_params 2 pop 0 params 0 6@
    END
END
0AB2: ret 0
 

Attachments

  • SampDisconnectWithReason.cs
    22.2 KB · Views: 5

dphome

Well-known member
Joined
Mar 21, 2020
Messages
457
Solutions
9
Reaction score
166
Location
Poland
It works great on 0.3.DL. Why can't you provide the client version you're testing on upfront? Oh
 
Status
Not open for further replies.
Top