[CLEO] Some multi-samp snippets

Status
Not open for further replies.

Parazitas

God
Staff member
Joined
Jan 2, 2017
Messages
3,315
Solutions
7
Reaction score
935
Location
Lithuania
PHP:
:SET_CHAT_INPUT_ENABLED
{
    0AB1: @SET_CHAT_INPUT_ENABLED 1 Status 0 // 1 = Enable, 0 = Disable
}
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 
            0A8E: 30@ = 31@ + 0x21A0E8 // SAMP_CHAT_INPUT_OFFSET
            0A8D: 30@ = readMem 30@ sz 4 vp 0
            IF 0@ == 1
            THEN 0A8E: 29@ = 31@ + 0x657E0 //SAMP_CHAT_INPUT_OPEN
            ELSE 0A8E: 29@ = 31@ + 0x658E0 //SAMP_CHAT_INPUT_CLOSE
            END
        END
        IF 17@ == 2 // 0.3.7 R2
        THEN
            0A8E: 30@ = 31@ + 0x21A0F0 // SAMP_CHAT_INPUT_OFFSET
            0A8D: 30@ = readMem 30@ sz 4 vp 0
            IF 0@ == 1
            THEN 0A8E: 29@ = 31@ + 0x658B0 //SAMP_CHAT_INPUT_OPEN
            ELSE 0A8E: 29@ = 31@ + 0x659B0 //SAMP_CHAT_INPUT_CLOSE
            END
        END
        
        IF 17@ == 3 // 0.3.DL
        THEN
            0A8E: 30@ = 31@ + 0x2ACA14 // SAMP_CHAT_INPUT_OFFSET
            0A8D: 30@ = readMem 30@ sz 4 vp 0
            IF 0@ == 1
            THEN 0A8E: 29@ = 31@ + 0x68EC0 //SAMP_CHAT_INPUT_OPEN
            ELSE 0A8E: 29@ = 31@ + 0x68FC0 //SAMP_CHAT_INPUT_CLOSE
            END
        END
        
        IF 17@ == 4 // 0.3.7 R3 
        THEN
            0A8E: 30@ = 31@ + 0x26E8CC // SAMP_CHAT_INPUT_OFFSET
            0A8D: 30@ = readMem 30@ sz 4 vp 0
            IF 0@ == 1
            THEN 0A8E: 29@ = 31@ + 0x68D10 //SAMP_CHAT_INPUT_OPEN
            ELSE 0A8E: 29@ = 31@ + 0x68E10 //SAMP_CHAT_INPUT_CLOSE
            END
        END
        
        IF 17@ == 5 // 0.3.7 R4
        THEN
            0A8E: 30@ = 31@ + 0x26E9FC // SAMP_CHAT_INPUT_OFFSET
            0A8D: 30@ = readMem 30@ sz 4 vp 0
            IF 0@ == 1
            THEN 0A8E: 29@ = 31@ + 0x69440 //SAMP_CHAT_INPUT_OPEN
            ELSE 0A8E: 29@ = 31@ + 0x69540 //SAMP_CHAT_INPUT_CLOSE
            END
        END
        
        IF 17@ == 6 // 0.3.7 R4 - v2
        THEN
            0A8E: 30@ = 31@ + 0x26E9FC // SAMP_CHAT_INPUT_OFFSET
            0A8D: 30@ = readMem 30@ sz 4 vp 0
            IF 0@ == 1
            THEN 0A8E: 29@ = 31@ + 0x69480 //SAMP_CHAT_INPUT_OPEN
            ELSE 0A8E: 29@ = 31@ + 0x69580 //SAMP_CHAT_INPUT_CLOSE
            END
        END
        
        IF 17@ == 7 // 0.3.7 R5
        THEN
            0A8E: 30@ = 31@ + 0x26EB84 // SAMP_CHAT_INPUT_OFFSET
            0A8D: 30@ = readMem 30@ sz 4 vp 0
            IF 0@ == 1
            THEN 0A8E: 29@ = 31@ + 0x69480 //SAMP_CHAT_INPUT_OPEN
            ELSE 0A8E: 29@ = 31@ + 0x69580 //SAMP_CHAT_INPUT_CLOSE
            END
        END
        0AA8: call_function_method 29@ struct 30@ num_params 0 pop 0 _retVal 6@
    END
END
0AB2: ret 0
 

Parazitas

God
Staff member
Joined
Jan 2, 2017
Messages
3,315
Solutions
7
Reaction score
935
Location
Lithuania
PHP:
:GetRegisteredCommandsCount
/*
    0AB1: @GetRegisteredCommandsCount 0 _Returned: CommandsCount 1@
*/
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 
            0A8E: 30@ = 31@ + 0x21A0E8            // SAMP_CHAT_INPUT_INFO_OFFSET
            0A8D: 29@ = readMem 30@ sz 4 vp 0     
            0A8E: 28@ = 29@ + 0x14DC // COMMANDS_COUNT_OFFSET
            0A8D: 28@ = readMem 28@ sz 4 vp 0
            IF 28@ > 0
            THEN
                28@ -= 1 
                0AB2: 1 28@
            END
        END
        IF 17@ == 2 // 0.3.7 R2
        THEN
            0A8E: 30@ = 31@ + 0x21A0F0            // SAMP_CHAT_INPUT_INFO_OFFSET
            0A8D: 29@ = readMem 30@ sz 4 vp 0     
            0A8E: 28@ = 29@ + 0x14DC // COMMANDS_COUNT_OFFSET
            0A8D: 28@ = readMem 28@ sz 4 vp 0
            IF 28@ > 0
            THEN
                28@ -= 1 
                0AB2: 1 28@
            END
        END
        
        IF 17@ == 3 // 0.3.DL
        THEN
            0A8E: 30@ = 31@ + 0x2ACA14            // SAMP_CHAT_INPUT_INFO_OFFSET
            0A8D: 29@ = readMem 30@ sz 4 vp 0     
            0A8E: 28@ = 29@ + 0x14DC // COMMANDS_COUNT_OFFSET
            0A8D: 28@ = readMem 28@ sz 4 vp 0
            IF 28@ > 0
            THEN
                28@ -= 1 
                0AB2: 1 28@
            END
        END
        
        IF 17@ == 4 // 0.3.7 R3 
        THEN
            0A8E: 30@ = 31@ + 0x26E8CC            // SAMP_CHAT_INPUT_INFO_OFFSET
            0A8D: 29@ = readMem 30@ sz 4 vp 0     
            0A8E: 28@ = 29@ + 0x14DC // COMMANDS_COUNT_OFFSET
            0A8D: 28@ = readMem 28@ sz 4 vp 0
            IF 28@ > 0
            THEN
                28@ -= 1 
                0AB2: 1 28@
            END
        END
        
        IF 17@ == 5 // 0.3.7 R4
        THEN
            0A8E: 30@ = 31@ + 0x26E9FC            // SAMP_CHAT_INPUT_INFO_OFFSET
            0A8D: 29@ = readMem 30@ sz 4 vp 0     
            0A8E: 28@ = 29@ + 0x14DC // COMMANDS_COUNT_OFFSET
            0A8D: 28@ = readMem 28@ sz 4 vp 0
            IF 28@ > 0
            THEN
                28@ -= 1 
                0AB2: 1 28@
            END
        END
        
        IF 17@ == 6 // 0.3.7 R4 - v2
        THEN
            0A8E: 30@ = 31@ + 0x26E9FC            // SAMP_CHAT_INPUT_INFO_OFFSET
            0A8D: 29@ = readMem 30@ sz 4 vp 0     
            0A8E: 28@ = 29@ + 0x14DC // COMMANDS_COUNT_OFFSET
            0A8D: 28@ = readMem 28@ sz 4 vp 0
            IF 28@ > 0
            THEN
                28@ -= 1 
                0AB2: 1 28@
            END
        END

        IF 17@ == 7 // 0.3.7 R5
        THEN
            0A8E: 30@ = 31@ + 0x26EB84 // SAMP_CHAT_INPUT_INFO_OFFSET   
            0A8D: 29@ = readMem 30@ sz 4 vp 0     
            0A8E: 28@ = 29@ + 0x14DC // COMMANDS_COUNT_OFFSET
            0A8D: 28@ = readMem 28@ sz 4 vp 0
            IF 28@ > 0
            THEN
                28@ -= 1 
                0AB2: 1 28@
            END
        END
    END
END
0AB2: 1 0
 
Last edited:

Parazitas

God
Staff member
Joined
Jan 2, 2017
Messages
3,315
Solutions
7
Reaction score
935
Location
Lithuania
PHP:
:GetRegisteredCommandName
/*
    0AB1: @GetRegisteredCommandName 1 CommandID 1 _Returned: Command 1@
*/
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 
            0A8E: 30@ = 31@ + 0x21A0E8 // SAMP_CHAT_INPUT_INFO_OFFSET
            0A8D: 29@ = readMem 30@ sz 4 vp 0 
            0A8E: 22@ = 29@ + 0x14DC // COMMANDS_COUNT_OFFSET
            0A8D: 22@ = readMem 22@ sz 4 vp 0 
            22@ -= 1   
            IF AND
            0@ == 0
            801D:   0@ > 22@  // (int)
            THEN 
                26@ = 0x24C // FIRST_COMMAND_OFFSET
                0A8E: 24@ = 29@ + 26@
                0A8D: 23@ = readMem 24@ sz 1 vp 0
                IF 23@ > 0
                THEN
                    0AB2: 1 24@
                END
            END
            IF AND
            0@ > 0
            801D:   0@ > 22@  // (int)
            THEN
                26@ = 0x24C // FIRST_COMMAND_OFFSET
                25@ = 0x21 // SIZE_OF_EACH_COMMAND_OFFSET
                006A: 25@ *= 0@  // (int)
                005A: 26@ += 25@  // (int)
                0A8E: 24@ = 29@ + 26@
                0A8D: 23@ = readMem 24@ sz 1 vp 0
                IF 23@ > 0
                THEN
                    0AB2: 1 24@
                END
            END
        END
        IF 17@ == 2 // 0.3.7 R2
        THEN
            0A8E: 30@ = 31@ + 0x21A0F0 // SAMP_CHAT_INPUT_INFO_OFFSET
            0A8D: 29@ = readMem 30@ sz 4 vp 0  
            0A8E: 22@ = 29@ + 0x14DC // COMMANDS_COUNT_OFFSET
            0A8D: 22@ = readMem 22@ sz 4 vp 0    
            22@ -= 1   
            IF AND
            0@ == 0
            801D:   0@ > 22@  // (int)
            THEN 
                26@ = 0x24C // FIRST_COMMAND_OFFSET
                0A8E: 24@ = 29@ + 26@
                0A8D: 23@ = readMem 24@ sz 1 vp 0
                IF 23@ > 0
                THEN
                    0AB2: 1 24@
                END
            END
            IF AND
            0@ > 0
            801D:   0@ > 22@  // (int)
            THEN
                26@ = 0x24C // FIRST_COMMAND_OFFSET
                25@ = 0x21 // SIZE_OF_EACH_COMMAND_OFFSET
                006A: 25@ *= 27@  // (int)
                005A: 26@ += 25@  // (int)
                0A8E: 24@ = 29@ + 26@
                0A8D: 23@ = readMem 24@ sz 1 vp 0
                IF 23@ > 0
                THEN
                    0AB2: 1 24@
                END
            END
        END
        
        IF 17@ == 3 // 0.3.DL
        THEN
            0A8E: 30@ = 31@ + 0x2ACA14 // SAMP_CHAT_INPUT_INFO_OFFSET
            0A8D: 29@ = readMem 30@ sz 4 vp 0   
            0A8E: 22@ = 29@ + 0x14DC // COMMANDS_COUNT_OFFSET
            0A8D: 22@ = readMem 22@ sz 4 vp 0 
            22@ -= 1      
            IF AND
            0@ == 0
            801D:   0@ > 22@  // (int)
            THEN 
                26@ = 0x24C // FIRST_COMMAND_OFFSET
                0A8E: 24@ = 29@ + 26@
                0A8D: 23@ = readMem 24@ sz 1 vp 0
                IF 23@ > 0
                THEN
                    0AB2: 1 24@
                END
            END
            IF AND
            0@ > 0
            801D:   0@ > 22@  // (int)
            THEN
                26@ = 0x24C // FIRST_COMMAND_OFFSET
                25@ = 0x21 // SIZE_OF_EACH_COMMAND_OFFSET
                006A: 25@ *= 0@  // (int)
                005A: 26@ += 25@  // (int)
                0A8E: 24@ = 29@ + 26@
                0A8D: 23@ = readMem 24@ sz 1 vp 0
                IF 23@ > 0
                THEN
                    0AB2: 1 24@
                END
            END
        END
        
        IF 17@ == 4 // 0.3.7 R3 
        THEN
            0A8E: 30@ = 31@ + 0x26E8CC // SAMP_CHAT_INPUT_INFO_OFFSET
            0A8D: 29@ = readMem 30@ sz 4 vp 0   
            0A8E: 22@ = 29@ + 0x14DC // COMMANDS_COUNT_OFFSET
            0A8D: 22@ = readMem 22@ sz 4 vp 0  
            22@ -= 1    
            IF AND
            0@ == 0
            801D:   0@ > 22@  // (int)
            THEN 
                26@ = 0x24C // FIRST_COMMAND_OFFSET
                0A8E: 24@ = 29@ + 26@
                0A8D: 23@ = readMem 24@ sz 1 vp 0
                IF 23@ > 0
                THEN
                    0AB2: 1 24@
                END
            END
            IF AND
            0@ > 0
            801D:   0@ > 22@  // (int)
            THEN
                26@ = 0x24C // FIRST_COMMAND_OFFSET
                25@ = 0x21 // SIZE_OF_EACH_COMMAND_OFFSET
                006A: 25@ *= 0@  // (int)
                005A: 26@ += 25@  // (int)
                0A8E: 24@ = 29@ + 26@
                0A8D: 23@ = readMem 24@ sz 1 vp 1
                IF 23@ > 0
                THEN
                    0AB2: 1 24@
                END
            END
        END
        
        IF 17@ == 5 // 0.3.7 R4
        THEN
            0A8E: 30@ = 31@ + 0x26E9FC // SAMP_CHAT_INPUT_INFO_OFFSET
            0A8D: 29@ = readMem 30@ sz 4 vp 0   
            0A8E: 22@ = 29@ + 0x14DC // COMMANDS_COUNT_OFFSET
            0A8D: 22@ = readMem 22@ sz 4 vp 0 
            22@ -= 1    
            IF AND
            0@ == 0
            801D:   0@ > 22@  // (int)
            THEN 
                26@ = 0x24C // FIRST_COMMAND_OFFSET
                0A8E: 24@ = 29@ + 26@
                0A8D: 23@ = readMem 24@ sz 1 vp 0
                IF 23@ > 0
                THEN
                    0AB2: 1 24@
                END
            END
            IF AND
            0@ > 0
            801D:   0@ > 22@  // (int)
            THEN
                26@ = 0x24C // FIRST_COMMAND_OFFSET
                25@ = 0x21 // SIZE_OF_EACH_COMMAND_OFFSET
                006A: 25@ *= 0@  // (int)
                005A: 26@ += 25@  // (int)
                0A8E: 24@ = 29@ + 26@
                0A8D: 23@ = readMem 24@ sz 1 vp 1
                IF 23@ > 0
                THEN
                    0AB2: 1 24@
                END
            END
        END
        
        IF 17@ == 6 // 0.3.7 R4 - v2
        THEN
            0A8E: 30@ = 31@ + 0x26E9FC // SAMP_CHAT_INPUT_INFO_OFFSET
            0A8D: 29@ = readMem 30@ sz 4 vp 0
            0A8E: 22@ = 29@ + 0x14DC // COMMANDS_COUNT_OFFSET
            0A8D: 22@ = readMem 22@ sz 4 vp 0   
            22@ -= 1     
            IF AND
            0@ == 0
            801D:   0@ > 22@  // (int)
            THEN 
                26@ = 0x24C // FIRST_COMMAND_OFFSET
                0A8E: 24@ = 29@ + 26@
                0A8D: 23@ = readMem 24@ sz 1 vp 1
                IF 23@ > 0
                THEN
                    0AB2: 1 24@
                END
            END
            IF AND
            0@ > 0
            801D:   0@ > 22@  // (int)
            THEN
                26@ = 0x24C // FIRST_COMMAND_OFFSET
                25@ = 0x21 // SIZE_OF_EACH_COMMAND_OFFSET
                006A: 25@ *= 0@  // (int)
                005A: 26@ += 25@  // (int)
                0A8E: 24@ = 29@ + 26@
                0A8D: 23@ = readMem 24@ sz 1 vp 1
                IF 23@ > 0
                THEN
                    0AB2: 1 24@
                END
            END
        END

        IF 17@ == 7 // 0.3.7 R5
        THEN
            0A8E: 30@ = 31@ + 0x26EB84 // SAMP_CHAT_INPUT_INFO_OFFSET   
            0A8D: 29@ = readMem 30@ sz 4 vp 0 
            0A8E: 22@ = 29@ + 0x14DC // COMMANDS_COUNT_OFFSET
            0A8D: 22@ = readMem 22@ sz 4 vp 0 
            22@ -= 1       
            IF AND
            0@ == 0
            801D:   0@ > 22@  // (int)
            THEN 
                26@ = 0x24C // FIRST_COMMAND_OFFSET
                0A8E: 24@ = 29@ + 26@
                0A8D: 23@ = readMem 24@ sz 1 vp 1
                IF 23@ > 0
                THEN
                    0AB2: 1 24@
                END
            END
            IF AND
            0@ > 0
            801D:   0@ > 22@  // (int)
            THEN
                26@ = 0x24C // FIRST_COMMAND_OFFSET
                25@ = 0x21 // SIZE_OF_EACH_COMMAND_OFFSET
                006A: 25@ *= 0@  // (int)
                005A: 26@ += 25@  // (int)
                0A8E: 24@ = 29@ + 26@
                0A8D: 23@ = readMem 24@ sz 1 vp 1
                IF 23@ > 0
                THEN
                    0AB2: 1 24@
                END
            END 
        END
    END
END
0AB2: 1 0
 
Last edited:

Parazitas

God
Staff member
Joined
Jan 2, 2017
Messages
3,315
Solutions
7
Reaction score
935
Location
Lithuania
PHP:
:SetRegisteredCommandName
/*
    0AC8: 2@ = allocate_memory_size 144
    0AD3: 2@ = format "bye"
    0AB1: @SetRegisteredCommandName 2 CommandID 1 NewCommandName 2@ // replacing command '/q' to '/bye
*/
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 
            0A8E: 30@ = 31@ + 0x21A0E8            // SAMP_CHAT_INPUT_INFO_OFFSET
            0A8D: 29@ = readMem 30@ sz 4 vp 0
            0A8E: 22@ = 29@ + 0x14DC // COMMANDS_COUNT_OFFSET
            0A8D: 22@ = readMem 22@ sz 4 vp 0 
            22@ -= 1                            
            IF AND
            0@ == 0
            801D:   0@ > 22@  // (int)
            THEN 
                26@ = 0x24C // FIRST_COMMAND_OFFSET
                0A8E: 24@ = 29@ + 26@
                0A8D: 23@ = readMem 24@ sz 1 vp 0
                IF 23@ > 0
                THEN
                    0AA7: call_function 0x718660 num_params 2 pop 2 source 1@ destination 24@ _Returned: value 20@ // Gta Strcpy
                END
            END
            IF AND
            0@ > 0
            801D:   0@ > 22@  // (int)
            THEN
                26@ = 0x24C // FIRST_COMMAND_OFFSET
                25@ = 0x21 // SIZE_OF_EACH_COMMAND_OFFSET
                006A: 25@ *= 0@  // (int)
                005A: 26@ += 25@  // (int)
                0A8E: 24@ = 29@ + 26@
                0A8D: 23@ = readMem 24@ sz 1 vp 0
                IF 23@ > 0
                THEN
                    0AA7: call_function 0x718660 num_params 2 pop 2 source 1@ destination 24@ _Returned: value 20@ // Gta Strcpy
                END
            END
        END
        IF 17@ == 2 // 0.3.7 R2
        THEN
            0A8E: 30@ = 31@ + 0x21A0F0            // SAMP_CHAT_INPUT_INFO_OFFSET
            0A8D: 29@ = readMem 30@ sz 4 vp 0 
            0A8E: 22@ = 29@ + 0x14DC // COMMANDS_COUNT_OFFSET
            0A8D: 22@ = readMem 22@ sz 4 vp 0 
            22@ -= 1                       
            IF AND
            0@ == 0
            801D:   0@ > 22@  // (int)
            THEN 
                26@ = 0x24C // FIRST_COMMAND_OFFSET
                0A8E: 24@ = 29@ + 26@
                0A8D: 23@ = readMem 24@ sz 1 vp 0
                IF 23@ > 0
                THEN
                    0AA7: call_function 0x718660 num_params 2 pop 2 source 1@ destination 24@ _Returned: value 20@ // Gta Strcpy
                END
            END
            IF AND
            0@ > 0
            801D:   0@ > 22@  // (int)
            THEN
                26@ = 0x24C // FIRST_COMMAND_OFFSET
                25@ = 0x21 // SIZE_OF_EACH_COMMAND_OFFSET
                006A: 25@ *= 27@  // (int)
                005A: 26@ += 25@  // (int)
                0A8E: 24@ = 29@ + 26@
                0A8D: 23@ = readMem 24@ sz 1 vp 0
                IF 23@ > 0
                THEN
                    0AA7: call_function 0x718660 num_params 2 pop 2 source 1@ destination 24@ _Returned: value 20@ // Gta Strcpy
                END
            END
        END
        
        IF 17@ == 3 // 0.3.DL
        THEN
            0A8E: 30@ = 31@ + 0x2ACA14            // SAMP_CHAT_INPUT_INFO_OFFSET
            0A8D: 29@ = readMem 30@ sz 4 vp 0
            0A8E: 22@ = 29@ + 0x14DC // COMMANDS_COUNT_OFFSET
            0A8D: 22@ = readMem 22@ sz 4 vp 0 
            22@ -= 1                   
            IF AND
            0@ == 0
            801D:   0@ > 22@  // (int)
            THEN 
                26@ = 0x24C // FIRST_COMMAND_OFFSET
                0A8E: 24@ = 29@ + 26@
                0A8D: 23@ = readMem 24@ sz 1 vp 0
                IF 23@ > 0
                THEN
                    0AA7: call_function 0x718660 num_params 2 pop 2 source 1@ destination 24@ _Returned: value 20@ // Gta Strcpy
                END
            END
            IF AND
            0@ > 0
            801D:   0@ > 22@  // (int)
            THEN
                26@ = 0x24C // FIRST_COMMAND_OFFSET
                25@ = 0x21 // SIZE_OF_EACH_COMMAND_OFFSET
                006A: 25@ *= 0@  // (int)
                005A: 26@ += 25@  // (int)
                0A8E: 24@ = 29@ + 26@
                0A8D: 23@ = readMem 24@ sz 1 vp 0
                IF 23@ > 0
                THEN
                    0AA7: call_function 0x718660 num_params 2 pop 2 source 1@ destination 24@ _Returned: value 20@ // Gta Strcpy
                END
            END
        END
        
        IF 17@ == 4 // 0.3.7 R3 
        THEN
            0A8E: 30@ = 31@ + 0x26E8CC            // SAMP_CHAT_INPUT_INFO_OFFSET
            0A8D: 29@ = readMem 30@ sz 4 vp 0  
            0A8E: 22@ = 29@ + 0x14DC // COMMANDS_COUNT_OFFSET
            0A8D: 22@ = readMem 22@ sz 4 vp 0 
            22@ -= 1              
            IF AND
            0@ == 0
            801D:   0@ > 22@  // (int)
            THEN 
                26@ = 0x24C // FIRST_COMMAND_OFFSET
                0A8E: 24@ = 29@ + 26@
                0A8D: 23@ = readMem 24@ sz 1 vp 0
                IF 23@ > 0
                THEN
                    0AA7: call_function 0x718660 num_params 2 pop 2 source 1@ destination 24@ _Returned: value 20@ // Gta Strcpy
                END
            END
            IF AND
            0@ > 0
            801D:   0@ > 22@  // (int)
            THEN
                26@ = 0x24C // FIRST_COMMAND_OFFSET
                25@ = 0x21 // SIZE_OF_EACH_COMMAND_OFFSET
                006A: 25@ *= 0@  // (int)
                005A: 26@ += 25@  // (int)
                0A8E: 24@ = 29@ + 26@
                0A8D: 23@ = readMem 24@ sz 1 vp 0
                IF 23@ > 0
                THEN
                    0AA7: call_function 0x718660 num_params 2 pop 2 source 1@ destination 24@ _Returned: value 20@ // Gta Strcpy
                END
            END
        END
        
        IF 17@ == 5 // 0.3.7 R4
        THEN
            0A8E: 30@ = 31@ + 0x26E9FC            // SAMP_CHAT_INPUT_INFO_OFFSET
            0A8D: 29@ = readMem 30@ sz 4 vp 0  
            0A8E: 22@ = 29@ + 0x14DC // COMMANDS_COUNT_OFFSET
            0A8D: 22@ = readMem 22@ sz 4 vp 0 
            22@ -= 1          
            IF AND
            0@ == 0
            801D:   0@ > 22@  // (int)
            THEN 
                26@ = 0x24C // FIRST_COMMAND_OFFSET
                0A8E: 24@ = 29@ + 26@
                0A8D: 23@ = readMem 24@ sz 1 vp 0
                IF 23@ > 0
                THEN
                    0AA7: call_function 0x718660 num_params 2 pop 2 source 1@ destination 24@ _Returned: value 20@ // Gta Strcpy
                END
            END
            IF AND
            0@ > 0
            801D:   0@ > 22@  // (int)
            THEN
                26@ = 0x24C // FIRST_COMMAND_OFFSET
                25@ = 0x21 // SIZE_OF_EACH_COMMAND_OFFSET
                006A: 25@ *= 0@  // (int)
                005A: 26@ += 25@  // (int)
                0A8E: 24@ = 29@ + 26@
                0A8D: 23@ = readMem 24@ sz 1 vp 0
                IF 23@ > 0
                THEN
                    0AA7: call_function 0x718660 num_params 2 pop 2 source 1@ destination 24@ _Returned: value 20@ // Gta Strcpy
                END
            END
        END
        
        IF 17@ == 6 // 0.3.7 R4 - v2
        THEN
            0A8E: 30@ = 31@ + 0x26E9FC            // SAMP_CHAT_INPUT_INFO_OFFSET
            0A8D: 29@ = readMem 30@ sz 4 vp 0  
            0A8E: 22@ = 29@ + 0x14DC // COMMANDS_COUNT_OFFSET
            0A8D: 22@ = readMem 22@ sz 4 vp 0 
            22@ -= 1      
            IF AND
            0@ == 0
            801D:   0@ > 22@  // (int)
            THEN 
                26@ = 0x24C // FIRST_COMMAND_OFFSET
                0A8E: 24@ = 29@ + 26@
                0A8D: 23@ = readMem 24@ sz 1 vp 0
                IF 23@ > 0
                THEN
                    0AA7: call_function 0x718660 num_params 2 pop 2 source 1@ destination 24@ _Returned: value 20@ // Gta Strcpy
                END
            END
            IF AND
            0@ > 0
            801D:   0@ > 22@  // (int)
            THEN
                26@ = 0x24C // FIRST_COMMAND_OFFSET
                25@ = 0x21 // SIZE_OF_EACH_COMMAND_OFFSET
                006A: 25@ *= 0@  // (int)
                005A: 26@ += 25@  // (int)
                0A8E: 24@ = 29@ + 26@
                0A8D: 23@ = readMem 24@ sz 1 vp 0
                IF 23@ > 0
                THEN
                    0AA7: call_function 0x718660 num_params 2 pop 2 source 1@ destination 24@ _Returned: value 20@ // Gta Strcpy
                END
            END
        END

        IF 17@ == 7 // 0.3.7 R5
        THEN
            0A8E: 30@ = 31@ + 0x26EB84 // SAMP_CHAT_INPUT_INFO_OFFSET   
            0A8D: 29@ = readMem 30@ sz 4 vp 0 
            0A8E: 22@ = 29@ + 0x14DC // COMMANDS_COUNT_OFFSET
            0A8D: 22@ = readMem 22@ sz 4 vp 0 
            22@ -= 1       
            IF AND
            0@ == 0
            801D:   0@ > 22@  // (int)
            THEN 
                26@ = 0x24C // FIRST_COMMAND_OFFSET
                0A8E: 24@ = 29@ + 26@
                0A8D: 23@ = readMem 24@ sz 1 vp 0
                IF 23@ > 0
                THEN
                    0AA7: call_function 0x718660 num_params 2 pop 2 source 1@ destination 24@ _Returned: value 20@ // Gta Strcpy
                END
            END
            IF AND
            0@ > 0
            801D:   0@ > 22@  // (int)
            THEN
                26@ = 0x24C // FIRST_COMMAND_OFFSET
                25@ = 0x21 // SIZE_OF_EACH_COMMAND_OFFSET
                006A: 25@ *= 0@  // (int)
                005A: 26@ += 25@  // (int)
                0A8E: 24@ = 29@ + 26@
                0A8D: 23@ = readMem 24@ sz 1 vp 0
                IF 23@ > 0
                THEN
                    0AA7: call_function 0x718660 num_params 2 pop 2 source 1@ destination 24@ _Returned: value 20@ // Gta Strcpy
                END
            END 
        END
    END
END
0AB2: 0
 
Last edited:

Parazitas

God
Staff member
Joined
Jan 2, 2017
Messages
3,315
Solutions
7
Reaction score
935
Location
Lithuania
PHP:
:ANTI_CRASH
{
    0AB1: @ANTI_CRASH 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 
            0A8E: 30@ = 31@ + 0x5CF2C // SAMP_ADD_CHAT_MESSAGE_FUNC_OFFSET
            0A8C: write_memory 30@ size 4 value 0x90909090 virtual_protect 1
            30@ += 4
            0A8C: write_memory 30@ size 1 value 0x90 virtual_protect 1
            30@ += 9
            0A8C: write_memory 30@ size 4 value 0x90909090 virtual_protect 1
            30@ += 4
            0A8C: write_memory 30@ size 1 value 0x90 virtual_protect 1 
        END
        IF 17@ == 2 // 0.3.7 R2
        THEN
            0A8E: 30@ = 31@ + 0x5D00C // SAMP_ADD_CHAT_MESSAGE_FUNC_OFFSET
            0A8C: write_memory 30@ size 4 value 0x90909090 virtual_protect 1
            30@ += 4
            0A8C: write_memory 30@ size 1 value 0x90 virtual_protect 1
            30@ += 9
            0A8C: write_memory 30@ size 4 value 0x90909090 virtual_protect 1
            30@ += 4
            0A8C: write_memory 30@ size 1 value 0x90 virtual_protect 1 
        END
        
        IF 17@ == 3 // 0.3.DL
        THEN
            0A8E: 30@ = 31@ + 0x604CC // SAMP_ADD_CHAT_MESSAGE_FUNC_OFFSET
            0A8C: write_memory 30@ size 4 value 0x90909090 virtual_protect 1
            30@ += 4
            0A8C: write_memory 30@ size 1 value 0x90 virtual_protect 1
            30@ += 9
            0A8C: write_memory 30@ size 4 value 0x90909090 virtual_protect 1
            30@ += 4
            0A8C: write_memory 30@ size 1 value 0x90 virtual_protect 1
        END
        
        IF 17@ == 4 // 0.3.7 R3 
        THEN
            0A8E: 30@ = 31@ + 0x602CC // SAMP_ADD_CHAT_MESSAGE_FUNC_OFFSET
            0A8C: write_memory 30@ size 4 value 0x90909090 virtual_protect 1
            30@ += 4
            0A8C: write_memory 30@ size 1 value 0x90 virtual_protect 1
            30@ += 9
            0A8C: write_memory 30@ size 4 value 0x90909090 virtual_protect 1
            30@ += 4
            0A8C: write_memory 30@ size 1 value 0x90 virtual_protect 1
            0A8E: 30@ = 31@ + 0x609B8 // SAMP_ADD_CHAT_MESSAGE_FUNC_OFFSET
            0A8C: write_memory 30@ size 4 value 0x90909090 virtual_protect 1
            30@ += 4
            0A8C: write_memory 30@ size 1 value 0x90 virtual_protect 1
        END
        
        IF 17@ == 5 // 0.3.7 R4
        THEN
            0A8E: 30@ = 31@ + 0x609FD // SAMP_ADD_CHAT_MESSAGE_FUNC_OFFSET
            0A8C: write_memory 30@ size 4 value 0x90909090 virtual_protect 1
            30@ += 4
            0A8C: write_memory 30@ size 1 value 0x90 virtual_protect 1
            30@ += 9
            0A8C: write_memory 30@ size 4 value 0x90909090 virtual_protect 1
            30@ += 4
            0A8C: write_memory 30@ size 1 value 0x90 virtual_protect 1
            0A8E: 30@ = 31@ + 0x609B8 // SAMP_ADD_CHAT_MESSAGE_FUNC_OFFSET
            0A8C: write_memory 30@ size 4 value 0x90909090 virtual_protect 1
            30@ += 4
            0A8C: write_memory 30@ size 1 value 0x90 virtual_protect 1
        END
        
        IF 17@ == 6 // 0.3.7 R4 - v2
        THEN
            0A8E: 30@ = 31@ + 0x60A4D // SAMP_ADD_CHAT_MESSAGE_FUNC_OFFSET
            0A8C: write_memory 30@ size 4 value 0x90909090 virtual_protect 1
            30@ += 4
            0A8C: write_memory 30@ size 1 value 0x90 virtual_protect 1
            30@ += 9
            0A8C: write_memory 30@ size 4 value 0x90909090 virtual_protect 1
            30@ += 4
            0A8C: write_memory 30@ size 1 value 0x90 virtual_protect 1
            0A8E: 30@ = 31@ + 0x60A08 // SAMP_ADD_CHAT_MESSAGE_FUNC_OFFSET
            0A8C: write_memory 30@ size 4 value 0x90909090 virtual_protect 1
            30@ += 4
            0A8C: write_memory 30@ size 1 value 0x90 virtual_protect 1
        END
        
        IF 17@ == 7 // 0.3.7 R5
        THEN
            0A8E: 30@ = 31@ + 0x60A4D // SAMP_ADD_CHAT_MESSAGE_FUNC_OFFSET
            0A8C: write_memory 30@ size 4 value 0x90909090 virtual_protect 1
            30@ += 4
            0A8C: write_memory 30@ size 1 value 0x90 virtual_protect 1
            30@ += 9
            0A8C: write_memory 30@ size 4 value 0x90909090 virtual_protect 1
            30@ += 4
            0A8C: write_memory 30@ size 1 value 0x90 virtual_protect 1
            0A8E: 30@ = 31@ + 0x60A08 // SAMP_ADD_CHAT_MESSAGE_FUNC_OFFSET
            0A8C: write_memory 30@ size 4 value 0x90909090 virtual_protect 1
            30@ += 4
            0A8C: write_memory 30@ size 1 value 0x90 virtual_protect 1
        END
    END
END
0AB2: ret 0
 

Parazitas

God
Staff member
Joined
Jan 2, 2017
Messages
3,315
Solutions
7
Reaction score
935
Location
Lithuania
Snippet together with funtion call allows you call registered commands directly without opening chat, so admin can't see what you typed.

Use snippet below with Funtion Call:
PHP:
0AA7: call_function 15@ num_params 1 pop 1 command_prams 30@ _retVal 19@ // 15@ is command handler ; 30@ is your command parms
Snippet:
PHP:
:GetRegisteredCommandHandler
/*
    0AB1: @GetRegisteredCommandHandler 1 CommandID 1 _Returned: Handler 15@
*/
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 
            0A8E: 30@ = 31@ + 0x21A0E8 // SAMP_CHAT_INPUT_INFO_OFFSET
            0A8D: 29@ = readMem 30@ sz 4 vp 0   
            0A8E: 22@ = 29@ + 0x14DC // COMMANDS_COUNT_OFFSET
            0A8D: 22@ = readMem 22@ sz 4 vp 0   
            22@ -= 1
            IF 801D:   0@ > 22@  // (int)
            THEN  
                28@ = 0xC // SIZE_OF_COMMAND_HANDLE_OFFSET
                0@ *= 0x4 // ID * 4
                005A: 28@ += 0@  // (int)
                005A: 29@ += 28@
                0A8D: 27@ = readMem 29@ sz 1 vp 0
                IF 27@ > 0
                THEN
                    0A8D: 26@ = readMem 29@ sz 4 vp 0
                    0AB2: 1 26@
                END
            END
        END
        IF 17@ == 2 // 0.3.7 R2
        THEN
            0A8E: 30@ = 31@ + 0x21A0F0 // SAMP_CHAT_INPUT_INFO_OFFSET
            0A8D: 29@ = readMem 30@ sz 4 vp 0   
            0A8E: 22@ = 29@ + 0x14DC // COMMANDS_COUNT_OFFSET
            0A8D: 22@ = readMem 22@ sz 4 vp 0   
            22@ -= 1
            IF 801D:   0@ > 22@  // (int)
            THEN      
                28@ = 0xC // SIZE_OF_COMMAND_HANDLE_OFFSET
                0@ *= 0x4 // ID * 4
                005A: 28@ += 0@  // (int)
                005A: 29@ += 28@
                0A8D: 27@ = readMem 29@ sz 1 vp 0
                IF 27@ > 0
                THEN
                    0A8D: 26@ = readMem 29@ sz 4 vp 0
                    0AB2: 1 26@
                END
            END
        END
        
        IF 17@ == 3 // 0.3.DL
        THEN
            0A8E: 30@ = 31@ + 0x2ACA14 // SAMP_CHAT_INPUT_INFO_OFFSET
            0A8D: 29@ = readMem 30@ sz 4 vp 0     
            0A8E: 22@ = 29@ + 0x14DC // COMMANDS_COUNT_OFFSET
            0A8D: 22@ = readMem 22@ sz 4 vp 0 
            22@ -= 1
            IF 801D:   0@ > 22@  // (int)
            THEN    
                28@ = 0xC // SIZE_OF_COMMAND_HANDLE_OFFSET
                0@ *= 0x4 // ID * 4
                005A: 28@ += 0@  // (int)
                005A: 29@ += 28@
                0A8D: 27@ = readMem 29@ sz 1 vp 0
                IF 27@ > 0
                THEN
                    0A8D: 26@ = readMem 29@ sz 4 vp 0
                    0AB2: 1 26@
                END
            END
        END
        
        IF 17@ == 4 // 0.3.7 R3 
        THEN
            0A8E: 30@ = 31@ + 0x26E8CC // SAMP_CHAT_INPUT_INFO_OFFSET
            0A8D: 29@ = readMem 30@ sz 4 vp 0   
            0A8E: 22@ = 29@ + 0x14DC // COMMANDS_COUNT_OFFSET
            0A8D: 22@ = readMem 22@ sz 4 vp 0   
            22@ -= 1
            IF 801D:   0@ > 22@  // (int)
            THEN      
                28@ = 0xC // SIZE_OF_COMMAND_HANDLE_OFFSET
                0@ *= 0x4// ID * 4
                005A: 28@ += 0@  // (int)
                005A: 29@ += 28@
                0A8D: 27@ = readMem 29@ sz 1 vp 0
                IF 27@ > 0
                THEN
                    0A8D: 26@ = readMem 29@ sz 4 vp 0
                    0AB2: 1 26@
                END
            END
        END
        
        IF 17@ == 5 // 0.3.7 R4
        THEN
            0A8E: 30@ = 31@ + 0x26E9FC // SAMP_CHAT_INPUT_INFO_OFFSET
            0A8D: 29@ = readMem 30@ sz 4 vp 0   
            0A8E: 22@ = 29@ + 0x14DC // COMMANDS_COUNT_OFFSET
            0A8D: 22@ = readMem 22@ sz 4 vp 0   
            22@ -= 1
            IF 801D:   0@ > 22@  // (int)
            THEN      
                28@ = 0xC // SIZE_OF_COMMAND_HANDLE_OFFSET
                0@ *= 0x4 // ID * 4
                005A: 28@ += 0@  // (int)
                005A: 29@ += 28@
                0A8D: 27@ = readMem 29@ sz 1 vp 0
                IF 27@ > 0
                THEN
                    0A8D: 26@ = readMem 29@ sz 4 vp 0
                    0AB2: 1 26@
                END
            END
        END
        
        IF 17@ == 6 // 0.3.7 R4 - v2
        THEN
            0A8E: 30@ = 31@ + 0x26E9FC // SAMP_CHAT_INPUT_INFO_OFFSET
            0A8D: 29@ = readMem 30@ sz 4 vp 0    
            0A8E: 22@ = 29@ + 0x14DC // COMMANDS_COUNT_OFFSET
            0A8D: 22@ = readMem 22@ sz 4 vp 0     
            22@ -= 1
            IF 801D:   0@ > 22@  // (int)
            THEN      
                28@ = 0xC // SIZE_OF_COMMAND_HANDLE_OFFSET
                0@ *= 0x4 // ID * 4
                005A: 28@ += 0@  // (int)
                005A: 29@ += 28@
                0A8D: 27@ = readMem 29@ sz 1 vp 0
                IF 27@ > 0
                THEN
                    0A8D: 26@ = readMem 29@ sz 4 vp 0
                    0AB2: 1 26@
                END
            END
        END

        IF 17@ == 7 // 0.3.7 R5
        THEN
            0A8E: 30@ = 31@ + 0x26EB84 // SAMP_CHAT_INPUT_INFO_OFFSET   
            0A8D: 29@ = readMem 30@ sz 4 vp 0   
            0A8E: 22@ = 29@ + 0x14DC // COMMANDS_COUNT_OFFSET
            0A8D: 22@ = readMem 22@ sz 4 vp 0 
            22@ -= 1
            IF 801D:   0@ > 22@  // (int)
            THEN   
                28@ = 0xC // SIZE_OF_COMMAND_HANDLE_OFFSET
                0@ *= 0x4 // ID * 4
                005A: 28@ += 0@  // (int)
                005A: 29@ += 28@
                0A8D: 27@ = readMem 29@ sz 1 vp 0
                IF 27@ > 0
                THEN
                    0A8D: 26@ = readMem 29@ sz 4 vp 0
                    0AB2: 1 26@
                END
            END
        END
    END
END
0AB2: 1 0
 
Last edited:

Parazitas

God
Staff member
Joined
Jan 2, 2017
Messages
3,315
Solutions
7
Reaction score
935
Location
Lithuania
PHP:
:IsSampObjectExist
{
    0AB1: @IsSampObjectExist 1 ObjectID 1249
}
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 // SAMP_INFO_OFFSET
            0A8D: 31@ readMem 31@ sz 4 vp 0
            31@ += 0x3CD // SAMP_PPOOLS_OFFSET
            0A8D: 31@ readMem 31@ sz 4 vp 0
            31@ += 0x4 // SAMP_PPOOL_OBJECT_OFFSET
            0A8D: 31@ readMem 31@ sz 4 vp 0
            0@ *= 0x4 // OBJECT_ID * 0x4
            0@ += 0xFA4  // SAMP_OBJECT_PPOOL_STRUCT_OFFSET
            005A: 31@ += 0@
            0A8D: 30@ = readMem 31@ sz 4 vp 0
        END
        
        IF 17@ == 2 // 0.3.7 R2
        THEN
            31@ += 0x21A100 // SAMP_INFO_OFFSET
            0A8D: 31@ readMem 31@ sz 4 vp 0
            31@ += 0x3C5 // SAMP_PPOOLS_OFFSET
            0A8D: 31@ readMem 31@ sz 4 vp 0
            31@ += 0x14 // SAMP_PPOOL_OBJECT_OFFSET
            0A8D: 31@ readMem 31@ sz 4 vp 0
            0@ *= 0x4 // OBJECT_ID * 0x4
            0@ += 0xFA4  // SAMP_OBJECT_PPOOL_STRUCT_OFFSET
            005A: 31@ += 0@
            0A8D: 30@ = readMem 31@ sz 4 vp 0
        END
       
        IF 17@ == 3 // 0.3.DL
        THEN
            31@ += 0x2ACA24 // SAMP_INFO_OFFSET
            0A8D: 31@ readMem 31@ sz 4 vp 0
            31@ += 0x3DE // SAMP_PPOOLS_OFFSET
            0A8D: 31@ readMem 31@ sz 4 vp 0
            31@ += 0x14 // SAMP_PPOOL_OBJECT_OFFSET
            0A8D: 31@ readMem 31@ sz 4 vp 0
            0@ *= 0x4 // OBJECT_ID * 0x4
            0@ += 0xFA4  // SAMP_OBJECT_PPOOL_STRUCT_OFFSET
            005A: 31@ += 0@
            0A8D: 30@ = readMem 31@ sz 4 vp 0 
        END
       
        IF 17@ == 4 // 0.3.7 R3
        THEN
            31@ += 0x26E8DC // SAMP_INFO_OFFSET
            0A8D: 31@ readMem 31@ sz 4 vp 0
            31@ += 0x3DE // SAMP_PPOOLS_OFFSET
            0A8D: 31@ readMem 31@ sz 4 vp 0
            31@ += 0x14 // SAMP_PPOOL_OBJECT_OFFSET
            0A8D: 31@ readMem 31@ sz 4 vp 0
            0@ *= 0x4 // OBJECT_ID * 0x4
            0@ += 0xFA4  // SAMP_OBJECT_PPOOL_STRUCT_OFFSET
            005A: 31@ += 0@
            0A8D: 30@ = readMem 31@ sz 4 vp 0 
        END
       
        IF 17@ == 5 // 0.3.7 R4
        THEN
            31@ += 0x26EA0C // SAMP_INFO_OFFSET
            0A8D: 31@ readMem 31@ sz 4 vp 0
            31@ += 0x3DE // SAMP_PPOOLS_OFFSET
            0A8D: 31@ readMem 31@ sz 4 vp 0
            31@ += 0x14 // SAMP_PPOOL_OBJECT_OFFSET
            0A8D: 31@ readMem 31@ sz 4 vp 0
            0@ *= 0x4 // OBJECT_ID * 0x4
            0@ += 0xFA4  // SAMP_OBJECT_PPOOL_STRUCT_OFFSET
            005A: 31@ += 0@
            0A8D: 30@ = readMem 31@ sz 4 vp 0 
        END
       
        IF 17@ == 6 // 0.3.7 R4 - v2
        THEN
            31@ += 0x26EA0C // SAMP_INFO_OFFSET
            0A8D: 31@ readMem 31@ sz 4 vp 0
            31@ += 0x3DE // SAMP_PPOOLS_OFFSET
            0A8D: 31@ readMem 31@ sz 4 vp 0
            31@ += 0xC // SAMP_PPOOL_OBJECT_OFFSET
            0A8D: 31@ readMem 31@ sz 4 vp 0
            0@ *= 0x4 // OBJECT_ID * 0x4
            0@ += 0xFA4  // SAMP_OBJECT_PPOOL_STRUCT_OFFSET
            005A: 31@ += 0@
            0A8D: 30@ = readMem 31@ sz 4 vp 0
        END

        IF 17@ == 7 // 0.3.7 R5
        THEN
            31@ += 0x26EB94 // SAMP_INFO_OFFSET
            0A8D: 31@ readMem 31@ sz 4 vp 0
            31@ += 0x3DE // SAMP_PPOOLS_OFFSET
            0A8D: 31@ readMem 31@ sz 4 vp 0
            31@ += 0xC // SAMP_PPOOL_OBJECT_OFFSET
            0A8D: 31@ readMem 31@ sz 4 vp 0
            0@ *= 0x4 // OBJECT_ID * 0x4
            0@ += 0xFA4  // SAMP_OBJECT_PPOOL_STRUCT_OFFSET
            005A: 31@ += 0@
            0A8D: 30@ = readMem 31@ sz 4 vp 0
        END
 
        IF 30@ > 0
        THEN 0485:  return_true
        ELSE 059A:  return_false
        END
    END
END
0AB2: 0
 

Parazitas

God
Staff member
Joined
Jan 2, 2017
Messages
3,315
Solutions
7
Reaction score
935
Location
Lithuania
PHP:
:SampDeleteObject
{
    0AB1: @SampDeleteObject 1 ID 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
            0A8E: 30@ = 31@ + 0x21A0F8 // SAMP_INFO_OFFSET 
            0A8D: 30@ = readMem 30@ sz 4 vp 0
            30@ += 0x3CD // SAMP_PPOOLS_OFFSET        
            0A8D: 30@ = readMem 30@ sz 4 vp 0
            30@ += 0x4 // SAMP_PPOOL_OBJECT_OFFSET       
            0A8D: 30@ = readMem 30@ sz 4 vp 0
       
            0A8E: 29@ = 31@ + 0xF3F0 // SAMP_DELETE_OBJECT_OFFSET
        END
        IF 17@ == 2 // 0.3.7 R2
        THEN
            0A8E: 30@ = 31@ + 0x21A100 // SAMP_INFO_OFFSET 
            0A8D: 30@ = readMem 30@ sz 4 vp 0
            30@ += 0x3C5 // SAMP_PPOOLS_OFFSET        
            0A8D: 30@ = readMem 30@ sz 4 vp 0
            30@ += 0x14 // SAMP_PPOOL_OBJECT_OFFSET       
            0A8D: 30@ = readMem 30@ sz 4 vp 0
       
            0A8E: 29@ = 31@ + 0xF4A0 // SAMP_DELETE_OBJECT_OFFSET
        END
       
        IF 17@ == 3 // 0.3.DL
        THEN
            0A8E: 30@ = 31@ + 0x2ACA24 // SAMP_INFO_OFFSET 
            0A8D: 30@ = readMem 30@ sz 4 vp 0
            30@ += 0x3DE // SAMP_PPOOLS_OFFSET        
            0A8D: 30@ = readMem 30@ sz 4 vp 0
            30@ += 0x14 // SAMP_PPOOL_OBJECT_OFFSET       
            0A8D: 30@ = readMem 30@ sz 4 vp 0
       
            0A8E: 29@ = 31@ + 0x12750 // SAMP_DELETE_OBJECT_OFFSET
        END
       
        IF 17@ == 4 // 0.3.7 R3
        THEN
            0A8E: 30@ = 31@ + 0x26E8DC // SAMP_INFO_OFFSET 
            0A8D: 30@ = readMem 30@ sz 4 vp 0
            30@ += 0x3DE // SAMP_PPOOLS_OFFSET        
            0A8D: 30@ = readMem 30@ sz 4 vp 0
            30@ += 0x14 // SAMP_PPOOL_OBJECT_OFFSET       
            0A8D: 30@ = readMem 30@ sz 4 vp 0
       
            0A8E: 29@ = 31@ + 0x12500 // SAMP_DELETE_OBJECT_OFFSET
        END
       
        IF 17@ == 5 // 0.3.7 R4
        THEN
            0A8E: 30@ = 31@ + 0x26EA0C // SAMP_INFO_OFFSET 
            0A8D: 30@ = readMem 30@ sz 4 vp 0
            30@ += 0x3DE // SAMP_PPOOLS_OFFSET        
            0A8D: 30@ = readMem 30@ sz 4 vp 0
            30@ += 0x14 // SAMP_PPOOL_OBJECT_OFFSET       
            0A8D: 30@ = readMem 30@ sz 4 vp 0
       
            0A8E: 29@ = 31@ + 0x12820 // SAMP_DELETE_OBJECT_OFFSET
        END
       
        IF 17@ == 6 // 0.3.7 R4 - v2
        THEN
            0A8E: 30@ = 31@ + 0x26EA0C // SAMP_INFO_OFFSET 
            0A8D: 30@ = readMem 30@ sz 4 vp 0
            30@ += 0x3DE // SAMP_PPOOLS_OFFSET        
            0A8D: 30@ = readMem 30@ sz 4 vp 0
            30@ += 0xC // SAMP_PPOOL_OBJECT_OFFSET       
            0A8D: 30@ = readMem 30@ sz 4 vp 0
       
            0A8E: 29@ = 31@ + 0x12850 // SAMP_DELETE_OBJECT_OFFSET
        END
       
        IF 17@ == 7 // 0.3.7 R5
        THEN
            0A8E: 30@ = 31@ + 0x26EB94 // SAMP_INFO_OFFSET 
            0A8D: 30@ = readMem 30@ sz 4 vp 0
            30@ += 0x3DE // SAMP_PPOOLS_OFFSET        
            0A8D: 30@ = readMem 30@ sz 4 vp 0
            30@ += 0xC // SAMP_PPOOL_OBJECT_OFFSET       
            0A8D: 30@ = readMem 30@ sz 4 vp 0
       
            0A8E: 29@ = 31@ + 0x12850 // SAMP_DELETE_OBJECT_OFFSET
        END
       
        0AA8: call_function_method 29@ struct 30@ num_params 1 pop 0 ID 0@ _Returned: Name 28@
        IF 28@ > 0
        THEN 0485:  RETURN_TRUE
        ELSE 059A:  RETURN_FALSE
        END
       
    END
END
0AB2: ret 0
 

Parazitas

God
Staff member
Joined
Jan 2, 2017
Messages
3,315
Solutions
7
Reaction score
935
Location
Lithuania
1. Check if CheckPoint Active
2. Get CheckPoint Position

PHP:
:is_cp_active
//  0AB1: @is_cp_active 0
IF 0AA2: 31@ = loadlib "samp.dll"
THEN 
    0AB1: @get_samp_version_id 0 _returned: ID 17@ 
    IF 17@ > 0
    THEN
        IF 17@ == 1 // 0.3.7 R1
        THEN 
            0A8E: 30@ = 31@ + 0x21A10C // SAMP_MISC_INFO_OFFSET
            0A8D: 30@ = readMem 30@ sz 4 vp 0
            30@ += 0x24 // SAMP_CHECKPOINT_ACTIVE_OFFSET
            0A8D: 30@ = readMem 30@ sz 4 vp 0
        END
        IF 17@ == 2 // 0.3.7 R2
        THEN
            0A8E: 30@ = 31@ + 0x21A114 // SAMP_MISC_INFO_OFFSET
            0A8D: 30@ = readMem 30@ sz 4 vp 0
            30@ += 0x4D // SAMP_CHECKPOINT_ACTIVE_OFFSET
            0A8D: 30@ = readMem 30@ sz 4 vp 0
        END
        IF 17@ == 3 // 0.3.DL
        THEN
            0A8E: 30@ = 31@ + 0x2ACA3C // SAMP_MISC_INFO_OFFSET
            0A8D: 30@ = readMem 30@ sz 4 vp 0
            30@ += 0x4D // SAMP_CHECKPOINT_ACTIVE_OFFSET
            0A8D: 30@ = readMem 30@ sz 4 vp 0
        END
        IF 17@ == 4 // 0.3.7 R3 
        THEN
            0A8E: 30@ = 31@ + 0x26E8F4 // SAMP_MISC_INFO_OFFSET
            0A8D: 30@ = readMem 30@ sz 4 vp 0
            30@ += 0x4D // SAMP_CHECKPOINT_ACTIVE_OFFSET
            0A8D: 30@ = readMem 30@ sz 4 vp 0
        END
        IF 17@ == 5 // 0.3.7 R4
        THEN
            0A8E: 30@ = 31@ + 0x26EA24 // SAMP_MISC_INFO_OFFSET
            0A8D: 30@ = readMem 30@ sz 4 vp 0
            30@ += 0x4D // SAMP_CHECKPOINT_ACTIVE_OFFSET
            0A8D: 30@ = readMem 30@ sz 4 vp 0
        END
        IF 17@ == 6 // 0.3.7 R4 - v2
        THEN
            0A8E: 30@ = 31@ + 0x26EA24 // SAMP_MISC_INFO_OFFSET
            0A8D: 30@ = readMem 30@ sz 4 vp 0
            30@ += 0x4D // SAMP_CHECKPOINT_ACTIVE_OFFSET
            0A8D: 30@ = readMem 30@ sz 4 vp 0
        END
        IF 17@ == 7 // 0.3.7 R5
        THEN
            0A8E: 30@ = 31@ + 0x26EBAC // SAMP_MISC_INFO_OFFSET
            0A8D: 30@ = readMem 30@ sz 4 vp 0
            30@ += 0x4D // SAMP_CHECKPOINT_ACTIVE_OFFSET
            0A8D: 30@ = readMem 30@ sz 4 vp 0
        END
        IF 30@ == TRUE
        THEN 0485:  return_true
        ELSE 059A:  return_false
        END
        0AA3: freelib 31@
    END
END
0AB2: ret 0
PHP:
:get_cp_pos
// 0AB1: @get_cp_pos 0 XYZ 1@ 2@ 3@
IF 0AA2: 31@ = loadlib "samp.dll"
THEN 
    0AB1: @get_samp_version_id 0 _returned: ID 17@ 
    IF 17@ > 0
    THEN
        IF 17@ == 1 // 0.3.7 R1
        THEN 
            0A8E: 30@ = 31@ + 0x21A10C // SAMP_MISC_INFO_OFFSET
            0A8D: 30@ = readMem 30@ sz 4 vp 0
            0A8E: 29@ = 30@ + 0xC // SAMP_CHECKPOINT_X_OFFSET
            0A8D: 28@ = readMem 29@ sz 4 vp 0
            0A8E: 27@ = 30@ + 0x10 // SAMP_CHECKPOINT_Y_OFFSET
            0A8D: 26@ = readMem 27@ sz 4 vp 0
            0A8E: 25@ = 30@ + 0x14 // SAMP_CHECKPOINT_Z_OFFSET
            0A8D: 24@ = readMem 25@ sz 4 vp 0
        END
        IF 17@ == 2 // 0.3.7 R2
        THEN
            0A8E: 30@ = 31@ + 0x21A114 // SAMP_MISC_INFO_OFFSET
            0A8D: 30@ = readMem 30@ sz 4 vp 0
            0A8E: 29@ = 30@ + 0x35 // SAMP_CHECKPOINT_X_OFFSET
            0A8D: 28@ = readMem 29@ sz 4 vp 0
            0A8E: 27@ = 30@ + 0x39 // SAMP_CHECKPOINT_Y_OFFSET
            0A8D: 26@ = readMem 27@ sz 4 vp 0
            0A8E: 25@ = 30@ + 0x3D // SAMP_CHECKPOINT_Z_OFFSET
            0A8D: 24@ = readMem 25@ sz 4 vp 0
        END
        IF 17@ == 3 // 0.3.DL
        THEN
            0A8E: 30@ = 31@ + 0x2ACA3C // SAMP_MISC_INFO_OFFSET
            0A8D: 30@ = readMem 30@ sz 4 vp 0
            0A8E: 29@ = 30@ + 0x35 // SAMP_CHECKPOINT_X_OFFSET
            0A8D: 28@ = readMem 29@ sz 4 vp 0
            0A8E: 27@ = 30@ + 0x39 // SAMP_CHECKPOINT_Y_OFFSET
            0A8D: 26@ = readMem 27@ sz 4 vp 0
            0A8E: 25@ = 30@ + 0x3D // SAMP_CHECKPOINT_Z_OFFSET
            0A8D: 24@ = readMem 25@ sz 4 vp 0
        END
        IF 17@ == 4 // 0.3.7 R3 
        THEN
            0A8E: 30@ = 31@ + 0x26E8F4 // SAMP_MISC_INFO_OFFSET
            0A8D: 30@ = readMem 30@ sz 4 vp 0
            0A8E: 29@ = 30@ + 0x35 // SAMP_CHECKPOINT_X_OFFSET
            0A8D: 28@ = readMem 29@ sz 4 vp 0
            0A8E: 27@ = 30@ + 0x39 // SAMP_CHECKPOINT_Y_OFFSET
            0A8D: 26@ = readMem 27@ sz 4 vp 0
            0A8E: 25@ = 30@ + 0x3D // SAMP_CHECKPOINT_Z_OFFSET
            0A8D: 24@ = readMem 25@ sz 4 vp 0
        END
        IF 17@ == 5 // 0.3.7 R4
        THEN
            0A8E: 30@ = 31@ + 0x26EA24 // SAMP_MISC_INFO_OFFSET
            0A8D: 30@ = readMem 30@ sz 4 vp 0
            0A8E: 29@ = 30@ + 0x35 // SAMP_CHECKPOINT_X_OFFSET
            0A8D: 28@ = readMem 29@ sz 4 vp 0
            0A8E: 27@ = 30@ + 0x39 // SAMP_CHECKPOINT_Y_OFFSET
            0A8D: 26@ = readMem 27@ sz 4 vp 0
            0A8E: 25@ = 30@ + 0x3D // SAMP_CHECKPOINT_Z_OFFSET
            0A8D: 24@ = readMem 25@ sz 4 vp 0
        END
        IF 17@ == 6 // 0.3.7 R4 - v2
        THEN
            0A8E: 30@ = 31@ + 0x26EA24 // SAMP_MISC_INFO_OFFSET
            0A8D: 30@ = readMem 30@ sz 4 vp 0
            0A8E: 29@ = 30@ + 0x35 // SAMP_CHECKPOINT_X_OFFSET
            0A8D: 28@ = readMem 29@ sz 4 vp 0
            0A8E: 27@ = 30@ + 0x39 // SAMP_CHECKPOINT_Y_OFFSET
            0A8D: 26@ = readMem 27@ sz 4 vp 0
            0A8E: 25@ = 30@ + 0x3D // SAMP_CHECKPOINT_Z_OFFSET
            0A8D: 24@ = readMem 25@ sz 4 vp 0
        END
        IF 17@ == 7 // 0.3.7 R5
        THEN
            0A8E: 30@ = 31@ + 0x26EBAC // SAMP_MISC_INFO_OFFSET
            0A8D: 30@ = readMem 30@ sz 4 vp 0
            0A8E: 29@ = 30@ + 0x35 // SAMP_CHECKPOINT_X_OFFSET
            0A8D: 28@ = readMem 29@ sz 4 vp 0
            0A8E: 27@ = 30@ + 0x39 // SAMP_CHECKPOINT_Y_OFFSET
            0A8D: 26@ = readMem 27@ sz 4 vp 0
            0A8E: 25@ = 30@ + 0x3D // SAMP_CHECKPOINT_Z_OFFSET
            0A8D: 24@ = readMem 25@ sz 4 vp 0
        END
        0AA3: freelib 31@
    END
END
0AB2: ret 3 28@ 26@ 24@
 

Parazitas

God
Staff member
Joined
Jan 2, 2017
Messages
3,315
Solutions
7
Reaction score
935
Location
Lithuania
1. Check if RACE CheckPoint Active
2. Get RACE CheckPoint Position

PHP:
:is_racecp_active
//  0AB1: @is_racecp_active 0
IF 0AA2: 31@ = loadlib "samp.dll"
THEN 
    0AB1: @get_samp_version_id 0 _returned: ID 17@ 
    IF 17@ > 0
    THEN
        IF 17@ == 1 // 0.3.7 R1
        THEN 
            0A8E: 30@ = 31@ + 0x21A10C // SAMP_MISC_INFO_OFFSET
            0A8D: 30@ = readMem 30@ sz 4 vp 0
            30@ += 0x49 // SAMP_CHECKPOINT_ACTIVE_OFFSET
            0A8D: 30@ = readMem 30@ sz 4 vp 0
        END
        IF 17@ == 2 // 0.3.7 R2
        THEN
            0A8E: 30@ = 31@ + 0x21A114 // SAMP_MISC_INFO_OFFSET
            0A8D: 30@ = readMem 30@ sz 4 vp 0
            30@ += 0x29 // SAMP_CHECKPOINT_ACTIVE_OFFSET
            0A8D: 30@ = readMem 30@ sz 4 vp 0
        END
        IF 17@ == 3 // 0.3.DL
        THEN
            0A8E: 30@ = 31@ + 0x2ACA3C // SAMP_MISC_INFO_OFFSET
            0A8D: 30@ = readMem 30@ sz 4 vp 0
            30@ += 0x29 // SAMP_CHECKPOINT_ACTIVE_OFFSET
            0A8D: 30@ = readMem 30@ sz 4 vp 0
        END
        IF 17@ == 4 // 0.3.7 R3 
        THEN
            0A8E: 30@ = 31@ + 0x26E8F4 // SAMP_MISC_INFO_OFFSET
            0A8D: 30@ = readMem 30@ sz 4 vp 0
            30@ += 0x29 // SAMP_CHECKPOINT_ACTIVE_OFFSET
            0A8D: 30@ = readMem 30@ sz 4 vp 0
        END
        IF 17@ == 5 // 0.3.7 R4
        THEN
            0A8E: 30@ = 31@ + 0x26EA24 // SAMP_MISC_INFO_OFFSET
            0A8D: 30@ = readMem 30@ sz 4 vp 0
            30@ += 0x29 // SAMP_CHECKPOINT_ACTIVE_OFFSET
            0A8D: 30@ = readMem 30@ sz 4 vp 0
        END
        IF 17@ == 6 // 0.3.7 R4 - v2
        THEN
            0A8E: 30@ = 31@ + 0x26EA24 // SAMP_MISC_INFO_OFFSET
            0A8D: 30@ = readMem 30@ sz 4 vp 0
            30@ += 0x4D // SAMP_CHECKPOINT_ACTIVE_OFFSET
            0A8D: 30@ = readMem 30@ sz 4 vp 0
        END
        IF 17@ == 7 // 0.3.7 R5
        THEN
            0A8E: 30@ = 31@ + 0x26EBAC // SAMP_MISC_INFO_OFFSET
            0A8D: 30@ = readMem 30@ sz 4 vp 0
            30@ += 0x29 // SAMP_CHECKPOINT_ACTIVE_OFFSET
            0A8D: 30@ = readMem 30@ sz 4 vp 0
        END
        IF 30@ == TRUE
        THEN 0485:  return_true
        ELSE 059A:  return_false
        END
        0AA3: freelib 31@
    END
END
0AB2: ret 0
PHP:
:get_racecp_pos
// 0AB1: @get_racecp_pos 0 XYZ 1@ 2@ 3@
IF 0AA2: 31@ = loadlib "samp.dll"
THEN 
    0AB1: @get_samp_version_id 0 _returned: ID 17@ 
    IF 17@ > 0
    THEN
        IF 17@ == 1 // 0.3.7 R1
        THEN 
            0A8E: 30@ = 31@ + 0x21A10C // SAMP_MISC_INFO_OFFSET
            0A8D: 30@ = readMem 30@ sz 4 vp 0
            0A8E: 29@ = 30@ + 0x2C // SAMP_CHECKPOINT_X_OFFSET
            0A8D: 28@ = readMem 29@ sz 4 vp 0
            0A8E: 27@ = 30@ + 0x30 // SAMP_CHECKPOINT_Y_OFFSET
            0A8D: 26@ = readMem 27@ sz 4 vp 0
            0A8E: 25@ = 30@ + 0x34 // SAMP_CHECKPOINT_Z_OFFSET
            0A8D: 24@ = readMem 25@ sz 4 vp 0
        END
        IF 17@ == 2 // 0.3.7 R2
        THEN
            0A8E: 30@ = 31@ + 0x21A114 // SAMP_MISC_INFO_OFFSET
            0A8D: 30@ = readMem 30@ sz 4 vp 0
            0A8E: 29@ = 30@ + 0xC // SAMP_CHECKPOINT_X_OFFSET
            0A8D: 28@ = readMem 29@ sz 4 vp 0
            0A8E: 27@ = 30@ + 0x10 // SAMP_CHECKPOINT_Y_OFFSET
            0A8D: 26@ = readMem 27@ sz 4 vp 0
            0A8E: 25@ = 30@ + 0x14 // SAMP_CHECKPOINT_Z_OFFSET
            0A8D: 24@ = readMem 25@ sz 4 vp 0
        END
        IF 17@ == 3 // 0.3.DL
        THEN
            0A8E: 30@ = 31@ + 0x2ACA3C // SAMP_MISC_INFO_OFFSET
            0A8D: 30@ = readMem 30@ sz 4 vp 0
            0A8E: 29@ = 30@ + 0xC // SAMP_CHECKPOINT_X_OFFSET
            0A8D: 28@ = readMem 29@ sz 4 vp 0
            0A8E: 27@ = 30@ + 0x10 // SAMP_CHECKPOINT_Y_OFFSET
            0A8D: 26@ = readMem 27@ sz 4 vp 0
            0A8E: 25@ = 30@ + 0x14 // SAMP_CHECKPOINT_Z_OFFSET
            0A8D: 24@ = readMem 25@ sz 4 vp 0
        END
        IF 17@ == 4 // 0.3.7 R3 
        THEN
            0A8E: 30@ = 31@ + 0x26E8F4 // SAMP_MISC_INFO_OFFSET
            0A8D: 30@ = readMem 30@ sz 4 vp 0
            0A8E: 29@ = 30@ + 0xC // SAMP_CHECKPOINT_X_OFFSET
            0A8D: 28@ = readMem 29@ sz 4 vp 0
            0A8E: 27@ = 30@ + 0x10 // SAMP_CHECKPOINT_Y_OFFSET
            0A8D: 26@ = readMem 27@ sz 4 vp 0
            0A8E: 25@ = 30@ + 0x14 // SAMP_CHECKPOINT_Z_OFFSET
            0A8D: 24@ = readMem 25@ sz 4 vp 0
        END
        IF 17@ == 5 // 0.3.7 R4
        THEN
            0A8E: 30@ = 31@ + 0x26EA24 // SAMP_MISC_INFO_OFFSET
            0A8D: 30@ = readMem 30@ sz 4 vp 0
            0A8E: 29@ = 30@ + 0xC // SAMP_CHECKPOINT_X_OFFSET
            0A8D: 28@ = readMem 29@ sz 4 vp 0
            0A8E: 27@ = 30@ + 0x10 // SAMP_CHECKPOINT_Y_OFFSET
            0A8D: 26@ = readMem 27@ sz 4 vp 0
            0A8E: 25@ = 30@ + 0x14 // SAMP_CHECKPOINT_Z_OFFSET
            0A8D: 24@ = readMem 25@ sz 4 vp 0
        END
        IF 17@ == 6 // 0.3.7 R4 - v2
        THEN
            0A8E: 30@ = 31@ + 0x26EA24 // SAMP_MISC_INFO_OFFSET
            0A8D: 30@ = readMem 30@ sz 4 vp 0
            0A8E: 29@ = 30@ + 0xC // SAMP_CHECKPOINT_X_OFFSET
            0A8D: 28@ = readMem 29@ sz 4 vp 0
            0A8E: 27@ = 30@ + 0x10 // SAMP_CHECKPOINT_Y_OFFSET
            0A8D: 26@ = readMem 27@ sz 4 vp 0
            0A8E: 25@ = 30@ + 0x14 // SAMP_CHECKPOINT_Z_OFFSET
            0A8D: 24@ = readMem 25@ sz 4 vp 0
        END
        IF 17@ == 7 // 0.3.7 R5
        THEN
            0A8E: 30@ = 31@ + 0x26EBAC // SAMP_MISC_INFO_OFFSET
            0A8D: 30@ = readMem 30@ sz 4 vp 0
            0A8E: 29@ = 30@ + 0xC // SAMP_CHECKPOINT_X_OFFSET
            0A8D: 28@ = readMem 29@ sz 4 vp 0
            0A8E: 27@ = 30@ + 0x10 // SAMP_CHECKPOINT_Y_OFFSET
            0A8D: 26@ = readMem 27@ sz 4 vp 0
            0A8E: 25@ = 30@ + 0x14 // SAMP_CHECKPOINT_Z_OFFSET
            0A8D: 24@ = readMem 25@ sz 4 vp 0
        END
        0AA3: freelib 31@
    END
END
0AB2: ret 3 28@ 26@ 24@
 

Parazitas

God
Staff member
Joined
Jan 2, 2017
Messages
3,315
Solutions
7
Reaction score
935
Location
Lithuania
PHP:
:SAMPSetActorVisibilityByPlayerID
{
    0AB1: @SAMPSetActorVisibilityByPlayerID 2 PlayerID 995 VisiblityState 6 // 6 - Player Invisible , 4 - Player Visible
    6 - Player Invisible
    4 - Player Visible
}
IF 0AA2: 31@ = loadlib "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 // SAMP_INFO_OFFSET
            0A8D: 31@ readMem 31@ sz 4 vp 0
            31@ += 0x3CD // SAMP_PPOOLS_OFFSET
            0A8D: 31@ readMem 31@ sz 4 vp 0
            31@ += 0x18 // SAMP_PPOOL_PLAYER_OFFSET
            0A8D: 31@ readMem 31@ sz 4 vp 0
            0@ *= 0x4 // PLAYER_ID * 4
            0@ += 0x2E // SAMP_REMOTEPLAYER_OFFSET
            005A: 31@ += 0@
            0A8D: 31@ readMem 31@ sz 4 vp 0
            IF 31@ > 0
            THEN
                31@ += 0x0 // SAMP_REMOTEPLAYERDATA_OFFSET
                0A8D: 31@ readMem 31@ sz 4 vp 0
                IF 31@ > 0
                THEN
                    31@ += 0x0 // SAMP_REMOTEPLAYERDATA_ACTOR_OFFSET
                    0A8D: 31@ readMem 31@ sz 4 vp 0
                    IF 31@ > 0
                    THEN
                        31@ += 0x40 // SAMP_REMOTEPLAYERDATA_STRUCT_OFFSET 
                        0A8D: 31@ readMem 31@ sz 4 vp 0
                        IF 31@ > 0
                        THEN 
                            31@ += 0x474
                            0A8C: writeMem 31@ sz 4 vl 1@ vp 0
                        END
                    END
                END
            END
        END
        IF 17@ == 2 // 0.3.7 R2
        THEN
            31@ += 0x21A100 // SAMP_INFO_OFFSET
            0A8D: 31@ readMem 31@ sz 4 vp 0
            31@ += 0x3C5 // SAMP_PPOOLS_OFFSET
            0A8D: 31@ readMem 31@ sz 4 vp 0
            31@ += 0x8 // SAMP_PPOOL_PLAYER_OFFSET
            0A8D: 31@ readMem 31@ sz 4 vp 0
            0@ *= 0x4 // PLAYER_ID * 4
            0@ += 0x26 // SAMP_REMOTEPLAYER_OFFSET
            005A: 31@ += 0@
            0A8D: 31@ readMem 31@ sz 4 vp 0
            IF 31@ > 0
            THEN
                31@ += 0xC // SAMP_REMOTEPLAYERDATA_OFFSET
                0A8D: 31@ readMem 31@ sz 4 vp 0
                IF 31@ > 0
                THEN
                    31@ += 0x1C // SAMP_REMOTEPLAYERDATA_ACTOR_OFFSET
                    0A8D: 31@ readMem 31@ sz 4 vp 0
                    IF 31@ > 0
                    THEN
                        31@ += 0x40 // SAMP_REMOTEPLAYERDATA_STRUCT_OFFSET 
                        0A8D: 31@ readMem 31@ sz 4 vp 0
                        IF 31@ > 0
                        THEN 
                            31@ += 0x474
                            0A8C: writeMem 31@ sz 4 vl 1@ vp 0
                        END
                    END
                END
            END
        END
        IF 17@ == 3 // 0.3.DL
        THEN
            31@ += 0x2ACA24 // SAMP_INFO_OFFSET
            0A8D: 31@ readMem 31@ sz 4 vp 0
            31@ += 0x3DE // SAMP_PPOOLS_OFFSET
            0A8D: 31@ readMem 31@ sz 4 vp 0
            31@ += 0x8 // SAMP_PPOOL_PLAYER_OFFSET
            0A8D: 31@ readMem 31@ sz 4 vp 0
            0@ *= 0x4 // PLAYER_ID * 4
            0@ += 0x26 // SAMP_REMOTEPLAYER_OFFSET
            005A: 31@ += 0@
            0A8D: 31@ readMem 31@ sz 4 vp 0
            IF 31@ > 0
            THEN
                31@ += 0x8 // SAMP_REMOTEPLAYERDATA_OFFSET
                0A8D: 31@ readMem 31@ sz 4 vp 0
                IF 31@ > 0
                THEN
                    31@ += 0x4 // SAMP_REMOTEPLAYERDATA_ACTOR_OFFSET
                    0A8D: 31@ readMem 31@ sz 4 vp 0
                    IF 31@ > 0
                    THEN
                        31@ += 0x40 // SAMP_REMOTEPLAYERDATA_STRUCT_OFFSET 
                        0A8D: 31@ readMem 31@ sz 4 vp 0
                        IF 31@ > 0
                        THEN 
                            31@ += 0x474
                            0A8C: writeMem 31@ sz 4 vl 1@ vp 0
                        END
                    END
                END
            END
        END
        IF 17@ == 4 // 0.3.7 R3 
        THEN
            31@ += 0x26E8DC // SAMP_INFO_OFFSET
            0A8D: 31@ readMem 31@ sz 4 vp 0
            31@ += 0x3DE // SAMP_PPOOLS_OFFSET
            0A8D: 31@ readMem 31@ sz 4 vp 0
            31@ += 0x8 // SAMP_PPOOL_PLAYER_OFFSET
            0A8D: 31@ readMem 31@ sz 4 vp 0
            0@ *= 0x4 // PLAYER_ID * 4
            0@ += 0x4 // SAMP_REMOTEPLAYER_OFFSET
            005A: 31@ += 0@
            0A8D: 31@ readMem 31@ sz 4 vp 0
            IF 31@ > 0
            THEN
                31@ += 0x0 // SAMP_REMOTEPLAYERDATA_OFFSET
                0A8D: 31@ readMem 31@ sz 4 vp 0
                IF 31@ > 0
                THEN
                    31@ += 0x0 // SAMP_REMOTEPLAYERDATA_ACTOR_OFFSET
                    0A8D: 31@ readMem 31@ sz 4 vp 0
                    IF 31@ > 0
                    THEN
                        31@ += 0x40 // SAMP_REMOTEPLAYERDATA_STRUCT_OFFSET 
                        0A8D: 31@ readMem 31@ sz 4 vp 0
                        IF 31@ > 0
                        THEN 
                            31@ += 0x474
                            0A8C: writeMem 31@ sz 4 vl 1@ vp 0
                        END
                    END
                END
            END
        END
        IF 17@ == 5 // 0.3.7 R4
        THEN
            31@ += 0x26EA0C // SAMP_INFO_OFFSET
            0A8D: 31@ readMem 31@ sz 4 vp 0
            31@ += 0x3DE // SAMP_PPOOLS_OFFSET
            0A8D: 31@ readMem 31@ sz 4 vp 0
            31@ += 0x8 // SAMP_PPOOL_PLAYER_OFFSET
            0A8D: 31@ readMem 31@ sz 4 vp 0
            0@ *= 0x4 // PLAYER_ID * 4
            0@ += 0x2E // SAMP_REMOTEPLAYER_OFFSET
            005A: 31@ += 0@
            0A8D: 31@ readMem 31@ sz 4 vp 0
            IF 31@ > 0
            THEN
                31@ += 0x10 // SAMP_REMOTEPLAYERDATA_OFFSET
                0A8D: 31@ readMem 31@ sz 4 vp 0
                IF 31@ > 0
                THEN
                    31@ += 0x1DD // SAMP_REMOTEPLAYERDATA_ACTOR_OFFSET
                    0A8D: 31@ readMem 31@ sz 4 vp 0
                    IF 31@ > 0
                    THEN
                        31@ += 0x40 // SAMP_REMOTEPLAYERDATA_STRUCT_OFFSET 
                        0A8D: 31@ readMem 31@ sz 4 vp 0
                        IF 31@ > 0
                        THEN 
                            31@ += 0x474
                            0A8C: writeMem 31@ sz 4 vl 1@ vp 0
                        END
                    END
                END
            END
        END
        IF 17@ == 6 // 0.3.7 R4 - v2
        THEN
            31@ += 0x26EA0C // SAMP_INFO_OFFSET
            0A8D: 31@ readMem 31@ sz 4 vp 0
            31@ += 0x3DE // SAMP_PPOOLS_OFFSET
            0A8D: 31@ readMem 31@ sz 4 vp 0
            31@ += 0x4 // SAMP_PPOOL_PLAYER_OFFSET
            0A8D: 31@ readMem 31@ sz 4 vp 0
            0@ *= 0x4 // PLAYER_ID * 4
            0@ += 0x1F8A // SAMP_REMOTEPLAYER_OFFSET
            005A: 31@ += 0@
            0A8D: 31@ readMem 31@ sz 4 vp 0
            IF 31@ > 0
            THEN
                31@ += 0x10 // SAMP_REMOTEPLAYERDATA_OFFSET
                0A8D: 31@ readMem 31@ sz 4 vp 0
                IF 31@ > 0
                THEN
                    31@ += 0x1DD // SAMP_REMOTEPLAYERDATA_ACTOR_OFFSET
                    0A8D: 31@ readMem 31@ sz 4 vp 0
                    IF 31@ > 0
                    THEN
                        31@ += 0x40 // SAMP_REMOTEPLAYERDATA_STRUCT_OFFSET 
                        0A8D: 31@ readMem 31@ sz 4 vp 0
                        IF 31@ > 0
                        THEN 
                            31@ += 0x474
                            0A8C: writeMem 31@ sz 4 vl 1@ vp 0
                        END
                    END
                END
            END
        END
        IF 17@ == 7 // 0.3.7 R5
        THEN
            31@ += 0x26EB94 // SAMP_INFO_OFFSET
            0A8D: 31@ readMem 31@ sz 4 vp 0
            31@ += 0x3DE // SAMP_PPOOLS_OFFSET
            0A8D: 31@ readMem 31@ sz 4 vp 0
            31@ += 0x4 // SAMP_PPOOL_PLAYER_OFFSET
            0A8D: 31@ readMem 31@ sz 4 vp 0
            0@ *= 0x4 // PLAYER_ID * 4
            0@ += 0x1F8A // SAMP_REMOTEPLAYER_OFFSET
            005A: 31@ += 0@
            0A8D: 31@ readMem 31@ sz 4 vp 0
            IF 31@ > 0
            THEN
                31@ += 0x10 // SAMP_REMOTEPLAYERDATA_OFFSET
                0A8D: 31@ readMem 31@ sz 4 vp 0
                IF 31@ > 0
                THEN
                    31@ += 0x1DD // SAMP_REMOTEPLAYERDATA_ACTOR_OFFSET
                    0A8D: 31@ readMem 31@ sz 4 vp 0
                    IF 31@ > 0
                    THEN
                        31@ += 0x40 // SAMP_REMOTEPLAYERDATA_STRUCT_OFFSET 
                        0A8D: 31@ readMem 31@ sz 4 vp 0
                        IF 31@ > 0
                        THEN 
                            31@ += 0x474
                            0A8C: writeMem 31@ sz 4 vl 1@ vp 0
                        END
                    END
                END
            END
        END
        0AA3: freelib 31@
    END
END
0AB2: ret 0
 

Parazitas

God
Staff member
Joined
Jan 2, 2017
Messages
3,315
Solutions
7
Reaction score
935
Location
Lithuania
PHP:
:RadarAndHudControlOnF7
{
    0AB1: @RadarAndHudControlOnF7 1 HideOrShow? TRUE
    TRUE = Hide only chat
    FALSE = Hide chat, radar, hud
}
IF 0AA2: 31@ = "samp.dll"
THEN     
    0AB1: @get_samp_version_id 0 _returned: ID 27@
    IF 27@ > 0
    THEN
        IF 27@ == 1 // 0.3.7 R1
        THEN
            0A8E: 30@ = 31@ + 0x7140F
            IF 0@ == TRUE
            THEN
                0A8C: write_memory 30@ size 1 value 1 virtual_protect 1
            ELSE                             
                0A8C: write_memory 30@ size 1 value 0 virtual_protect 1
            END
        END
        IF 27@ == 2 // 0.3.7 R2
        THEN
            0A8E: 30@ = 31@ + 0x714AF
            IF 0@ == TRUE
            THEN
                0A8C: write_memory 30@ size 1 value 1 virtual_protect 1
            ELSE                             
                0A8C: write_memory 30@ size 1 value 0 virtual_protect 1
            END
        END
       
        IF 27@ == 3 // 0.3.DL
        THEN
            0A8E: 30@ = 31@ + 0x7548F
            IF 0@ == TRUE
            THEN
                0A8C: write_memory 30@ size 1 value 1 virtual_protect 1
            ELSE                             
                0A8C: write_memory 30@ size 1 value 0 virtual_protect 1
            END
        END
       
        IF 27@ == 4 // 0.3.7 R3
        THEN
            0A8E: 30@ = 31@ + 0x752FF
            IF 0@ == TRUE
            THEN
                0A8C: write_memory 30@ size 1 value 1 virtual_protect 1
            ELSE                             
                0A8C: write_memory 30@ size 1 value 0 virtual_protect 1
            END
        END
       
        IF 27@ == 5 // 0.3.7 R4
        THEN
            0A8E: 30@ = 31@ + 0x75A3F
            IF 0@ == TRUE
            THEN
                0A8C: write_memory 30@ size 1 value 1 virtual_protect 1
            ELSE                             
                0A8C: write_memory 30@ size 1 value 0 virtual_protect 1
            END
        END
       
        IF 27@ == 6 // 0.3.7 R4 - v2
        THEN
            0A8E: 30@ = 31@ + 0x75A6E
            IF 0@ == TRUE
            THEN
                0A8C: write_memory 30@ size 1 value 1 virtual_protect 1
            ELSE                             
                0A8C: write_memory 30@ size 1 value 0 virtual_protect 1
            END
        END

        IF 27@ == 7 // 0.3.7 R5
        THEN
            0A8E: 30@ = 31@ + 0x75A0E
            IF 0@ == TRUE
            THEN
                0A8C: write_memory 30@ size 1 value 1 virtual_protect 1
            ELSE                             
                0A8C: write_memory 30@ size 1 value 0 virtual_protect 1
            END
        END           
    END
END
0AB2: 0
 
Last edited:

Parazitas

God
Staff member
Joined
Jan 2, 2017
Messages
3,315
Solutions
7
Reaction score
935
Location
Lithuania
PHP:
:SAMPIsLocalPlayerSpawned
{
    IF 0AB1: @SAMPIsLocalPlayerSpawned 0
}
IF 0AA2: 31@ = "samp.dll"
THEN     
    0AB1: @get_samp_version_id 0 _returned: ID 27@
    IF 27@ > 0
    THEN
        IF 27@ == 1 // 0.3.7 R1
        THEN
            31@ += 0x21A0F8 // SAMP_INFO_OFFSET
            0A8D: 31@ = readmem 31@ sz 4 vp 0
            31@ += 0x3CD // SAMP_POOLS_OFFSET
            0A8D: 31@ = readmem 31@ sz 4 vp 0
            31@ += 0x18 // SAMP_POOL_PLAYER_OFFSET
            0A8D: 31@ = readmem 31@ sz 4 vp 0
            31@ += 0x22 // SAMP_LOCAL_PLAYER_OFFSET
            0A8D: 31@ readMem 31@ sz 4 vp 0
            31@ += 0x136 // SAMP_LOCAL_PLAYER_SPAWNED_OFFSET
            0A8D: 31@ readMem 31@ sz 2 vp 0
            IF 31@ > 0
            THEN 0485:  return_true
            ELSE 059A:  return_false
            END
        END
        IF 27@ == 2 // 0.3.7 R2
        THEN
            31@ += 0x21A100 // SAMP_INFO_OFFSET
            0A8D: 31@ = readmem 31@ sz 4 vp 0
            31@ += 0x3C5 // SAMP_POOLS_OFFSET
            0A8D: 31@ = readmem 31@ sz 4 vp 0
            31@ += 0x8 // SAMP_POOL_PLAYER_OFFSET
            0A8D: 31@ = readmem 31@ sz 4 vp 0
            31@ += 0x1E // SAMP_LOCAL_PLAYER_OFFSET
            0A8D: 31@ readMem 31@ sz 4 vp 0
            31@ += 0x171 // SAMP_LOCAL_PLAYER_SPAWNED_OFFSET
            0A8D: 31@ readMem 31@ sz 2 vp 0 
            IF 31@ > 0
            THEN 0485:  return_true
            ELSE 059A:  return_false
            END
        END
       
        IF 27@ == 3 // 0.3.DL
        THEN
            31@ += 0x2ACA24 // SAMP_INFO_OFFSET
            0A8D: 31@ = readmem 31@ sz 4 vp 0
            31@ += 0x3DE // SAMP_POOLS_OFFSET
            0A8D: 31@ = readmem 31@ sz 4 vp 0
            31@ += 0x8 // SAMP_POOL_PLAYER_OFFSET
            0A8D: 31@ = readmem 31@ sz 4 vp 0
            31@ += 0x1E // SAMP_LOCAL_PLAYER_OFFSET
            0A8D: 31@ readMem 31@ sz 4 vp 0
            31@ += 0x181 // SAMP_LOCAL_PLAYER_SPAWNED_OFFSET
            0A8D: 31@ readMem 31@ sz 2 vp 0    
            IF 31@ > 0
            THEN 0485:  return_true
            ELSE 059A:  return_false
            END
        END
       
        IF 27@ == 4 // 0.3.7 R3
        THEN
            31@ += 0x26E8DC // SAMP_INFO_OFFSET
            0A8D: 31@ = readmem 31@ sz 4 vp 0
            31@ += 0x3DE // SAMP_POOLS_OFFSET
            0A8D: 31@ = readmem 31@ sz 4 vp 0
            31@ += 0x8 // SAMP_POOL_PLAYER_OFFSET
            0A8D: 31@ = readmem 31@ sz 4 vp 0
            31@ += 0x2F3A // SAMP_LOCAL_PLAYER_OFFSET
            0A8D: 31@ readMem 31@ sz 4 vp 0
            31@ += 0x17D // SAMP_LOCAL_PLAYER_SPAWNED_OFFSET
            0A8D: 31@ readMem 31@ sz 2 vp 0  
            IF 31@ > 0
            THEN 0485:  return_true
            ELSE 059A:  return_false
            END
        END
       
        IF 27@ == 5 // 0.3.7 R4
        THEN
            31@ += 0x26EA0C // SAMP_INFO_OFFSET
            0A8D: 31@ = readmem 31@ sz 4 vp 0
            31@ += 0x3DE // SAMP_POOLS_OFFSET
            0A8D: 31@ = readmem 31@ sz 4 vp 0
            31@ += 0x8 // SAMP_POOL_PLAYER_OFFSET
            0A8D: 31@ = readmem 31@ sz 4 vp 0
            31@ += 0x2A // SAMP_LOCAL_PLAYER_OFFSET
            0A8D: 31@ readMem 31@ sz 4 vp 0
            31@ += 0x17D // SAMP_LOCAL_PLAYER_SPAWNED_OFFSET
            0A8D: 31@ readMem 31@ sz 2 vp 0    
            IF 31@ > 0
            THEN 0485:  return_true
            ELSE 059A:  return_false
            END
        END
       
        IF 27@ == 6 // 0.3.7 R4 - v2
        THEN
            31@ += 0x26EA0C // SAMP_INFO_OFFSET
            0A8D: 31@ = readmem 31@ sz 4 vp 0
            31@ += 0x3DE // SAMP_POOLS_OFFSET
            0A8D: 31@ = readmem 31@ sz 4 vp 0
            31@ += 0x4 // SAMP_POOL_PLAYER_OFFSET
            0A8D: 31@ = readmem 31@ sz 4 vp 0
            31@ += 0x26 // SAMP_LOCAL_PLAYER_OFFSET
            0A8D: 31@ readMem 31@ sz 4 vp 0
            31@ += 0x17D // SAMP_LOCAL_PLAYER_SPAWNED_OFFSET
            0A8D: 31@ readMem 31@ sz 2 vp 0  
            IF 31@ > 0
            THEN 0485:  return_true
            ELSE 059A:  return_false
            END
        END

        IF 27@ == 7 // 0.3.7 R5
        THEN
            31@ += 0x26EB94 // SAMP_INFO_OFFSET
            0A8D: 31@ = readmem 31@ sz 4 vp 0
            31@ += 0x3DE // SAMP_POOLS_OFFSET
            0A8D: 31@ = readmem 31@ sz 4 vp 0
            31@ += 0x4 // SAMP_POOL_PLAYER_OFFSET
            0A8D: 31@ = readmem 31@ sz 4 vp 0
            31@ += 0x26 // SAMP_LOCAL_PLAYER_OFFSET
            0A8D: 31@ readMem 31@ sz 4 vp 0
            31@ += 0x17D // SAMP_LOCAL_PLAYER_SPAWNED_OFFSET
            0A8D: 31@ readMem 31@ sz 2 vp 0  
            IF 31@ > 0
            THEN 0485:  return_true
            ELSE 059A:  return_false
            END
        END           
    END
END
0AB2: 0
 

Parazitas

God
Staff member
Joined
Jan 2, 2017
Messages
3,315
Solutions
7
Reaction score
935
Location
Lithuania
Some servers intended to disable players name tag for their own benefits, like... make there own nametags..., so this snippet not gonna let to do that...


Use before fully connecting to server.

PHP:
:BlockFuntion_SetShowPlayerNameTagForPlayer
{
    0AB1: @BlockFuntion_SetShowPlayerNameTagForPlayer 1 Nop? TRUE
}
IF 0AA2: 31@ = "samp.dll" // IF and SET
THEN
    0AB1: @get_samp_version_id 0 _returned: ID 17@
    IF NOT 17@ < 1
    THEN
        IF 17@ == 1 // 0.3.7 R1
        THEN
            IF 0@ == TRUE
            THEN
                0A8E: 30@ = 31@ + 0x2A18CA
                0A8C: writeMem 30@ sz 2 vl 0x9090 vp 1
                30@ += 0x2
                0A8C: writeMem 30@ sz 1 vl 0x90 vp 1
            ELSE
                0A8E: 30@ = 31@ + 0x2A18CA
                0A8C: writeMem 30@ sz 2 vl 0xB388 vp 1
                30@ += 0x2
                0A8C: writeMem 30@ sz 1 vl 0x89 vp 1
            END
        END
        IF 17@ == 2 // 0.3.7 R2
        THEN
            IF 0@ == TRUE
            THEN
                0A8E: 30@ = 31@ + 0x231D70
                0A8C: writeMem 30@ sz 2 vl 0x9090 vp 1
                30@ += 0x2
                0A8C: writeMem 30@ sz 1 vl 0x90 vp 1
            ELSE
                0A8E: 30@ = 31@ + 0x231D70
                0A8C: writeMem 30@ sz 2 vl 0x0848 vp 1
                30@ += 0x2
                0A8C: writeMem 30@ sz 1 vl 0x89 vp 1
            END    
        END
     
        IF 17@ == 3 // 0.3.DL
        THEN
            IF 0@ == TRUE
            THEN
                0A8E: 30@ = 31@ + 0x1BA02
                0A8C: writeMem 30@ sz 2 vl 0x9090 vp 1
                30@ += 0x2
                0A8C: writeMem 30@ sz 1 vl 0x90 vp 1
            ELSE
                0A8E: 30@ = 31@ + 0x1BA02
                0A8C: writeMem 30@ sz 2 vl 0x1048 vp 1
                30@ += 0x2
                0A8C: writeMem 30@ sz 1 vl 0x89 vp 1
            END
        END
     
        IF 17@ == 4 // 0.3.7 R3
        THEN
            IF 0@ == TRUE
            THEN
                0A8E: 30@ = 31@ + 0x1B7DF
                0A8C: writeMem 30@ sz 2 vl 0x9090 vp 1
                30@ += 0x2
                0A8C: writeMem 30@ sz 1 vl 0x90 vp 1
            ELSE
                0A8E: 30@ = 31@ + 0x1B7DF
                0A8C: writeMem 30@ sz 2 vl 0x1048 vp 1
                30@ += 0x2
                0A8C: writeMem 30@ sz 1 vl 0x89 vp 1
            END
        END
     
        IF 17@ == 5 // 0.3.7 R4
        THEN
            IF 0@ == TRUE
            THEN
                0A8E: 30@ = 31@ + 0x1BE82
                0A8C: writeMem 30@ sz 2 vl 0x9090 vp 1
                30@ += 0x2
                0A8C: writeMem 30@ sz 1 vl 0x90 vp 1
            ELSE
                0A8E: 30@ = 31@ + 0x1BE82
                0A8C: writeMem 30@ sz 2 vl 0x0448 vp 1
                30@ += 0x2
                0A8C: writeMem 30@ sz 1 vl 0x89 vp 1
            END   
        END
     
        IF 17@ == 6 // 0.3.7 R4 - v2
        THEN
            IF 0@ == TRUE
            THEN
                0A8E: 30@ = 31@ + 0x1BED2
                0A8C: writeMem 30@ sz 2 vl 0x9090 vp 1
                30@ += 0x2
                0A8C: writeMem 30@ sz 1 vl 0x90 vp 1
            ELSE
                0A8E: 30@ = 31@ + 0x1BED2
                0A8C: writeMem 30@ sz 2 vl 0x0448 vp 1
                30@ += 0x2
                0A8C: writeMem 30@ sz 1 vl 0x89 vp 1
            END
        END
     
        IF 17@ == 7 // 0.3.7 R5
        THEN
            IF 0@ == TRUE
            THEN
                0A8E: 30@ = 31@ + 0x1BA02
                0A8C: writeMem 30@ sz 2 vl 0x9090 vp 1
                30@ += 0x2
                0A8C: writeMem 30@ sz 1 vl 0x90 vp 1
            ELSE    
                0A8E: 30@ = 31@ + 0x1BA02
                0A8C: writeMem 30@ sz 2 vl 0x0D89 vp 1
                30@ += 0x2
                0A8C: writeMem 30@ sz 1 vl 0x64 vp 1
            END    
        END
    END
END
0AB2: RET 0
 
Last edited:

Parazitas

God
Staff member
Joined
Jan 2, 2017
Messages
3,315
Solutions
7
Reaction score
935
Location
Lithuania
Server Name Tag Settings control in your own hands...
PHP:
:SetShowNameTagState
{
    0AB1: @SetShowNameTagState 3 ShowNameTags? TRUE HideBehindWals? FALSE Distance 300.0
}
IF 0AA2: 31@ = "samp.dll" // IF and SET
THEN
    0AB1: @get_samp_version_id 0 _returned: ID 17@ 
    IF NOT 17@ < 1
    THEN
        IF 17@ == 1 // 0.3.7 R1
        THEN 
            0A8E: 31@ = 31@ + 0x21A0F8 // SAMP_INFO_OFFSET
            0A8D: 31@ = readMem 31@ sz 4 vp 0 
            000A: 31@ += 0x3C5 // SERVER_PRESET_OFFSET
            0A8D: 31@ = readMem 31@ sz 4 vp 0
            0A8E: 30@ = 31@ + 0x38 // SHOW_NAME_TAGS_OFFSET
            0A8E: 29@ = 31@ + 0x2F // NAME_TAGS_BEHIND_WALLS_OFFSET
            0A8E: 28@ = 31@ + 0x27 // NAME_TAGS_DISTANCE_OFFSET
            0A8C: writeMem 30@ sz 1 vl 0@ vp 1 
            0A8C: writeMem 29@ sz 1 vl 1@ vp 1
            0A8C: writeMem 28@ sz 4 vl 2@ vp 1 
        END
        IF 17@ == 2 // 0.3.7 R2
        THEN 
            0A8E: 31@ = 31@ + 0x21A100 // SAMP_INFO_OFFSET
            0A8D: 31@ = readMem 31@ sz 4 vp 0 
            000A: 31@ += 0x3C1 // SERVER_PRESET_OFFSET
            0A8D: 31@ = readMem 31@ sz 4 vp 0
            0A8E: 30@ = 31@ + 0x38 // SHOW_NAME_TAGS_OFFSET
            0A8E: 29@ = 31@ + 0x2F // NAME_TAGS_BEHIND_WALLS_OFFSET
            0A8E: 28@ = 31@ + 0x27 // NAME_TAGS_DISTANCE_OFFSET
            0A8C: writeMem 30@ sz 1 vl 0@ vp 1 
            0A8C: writeMem 29@ sz 1 vl 1@ vp 1
            0A8C: writeMem 28@ sz 4 vl 2@ vp 1 
        END
        
        IF 17@ == 3 // 0.3.DL
        THEN 
            0A8E: 31@ = 31@ + 0x2ACA24 // SAMP_INFO_OFFSET
            0A8D: 31@ = readMem 31@ sz 4 vp 0 
            000A: 31@ += 0x3D5 // SERVER_PRESET_OFFSET
            0A8D: 31@ = readMem 31@ sz 4 vp 0
            0A8E: 30@ = 31@ + 0x38 // SHOW_NAME_TAGS_OFFSET
            0A8E: 29@ = 31@ + 0x2F // NAME_TAGS_BEHIND_WALLS_OFFSET
            0A8E: 28@ = 31@ + 0x27 // NAME_TAGS_DISTANCE_OFFSET
            0A8C: writeMem 30@ sz 1 vl 0@ vp 1 
            0A8C: writeMem 29@ sz 1 vl 1@ vp 1
            0A8C: writeMem 28@ sz 4 vl 2@ vp 1 
        END
        
        IF 17@ == 4 // 0.3.7 R3
        THEN 
            0A8E: 31@ = 31@ + 0x26E8DC // SAMP_INFO_OFFSET
            0A8D: 31@ = readMem 31@ sz 4 vp 0 
            000A: 31@ += 0x3D5 // SERVER_PRESET_OFFSET
            0A8D: 31@ = readMem 31@ sz 4 vp 0
            0A8E: 30@ = 31@ + 0x38 // SHOW_NAME_TAGS_OFFSET
            0A8E: 29@ = 31@ + 0x2F // NAME_TAGS_BEHIND_WALLS_OFFSET
            0A8E: 28@ = 31@ + 0x27 // NAME_TAGS_DISTANCE_OFFSET
            0A8C: writeMem 30@ sz 1 vl 0@ vp 1 
            0A8C: writeMem 29@ sz 1 vl 1@ vp 1
            0A8C: writeMem 28@ sz 4 vl 2@ vp 1
        END
        
        IF 17@ == 5 // 0.3.7 R4
        THEN 
            0A8E: 31@ = 31@ + 0x26EA0C // SAMP_INFO_OFFSET
            0A8D: 31@ = readMem 31@ sz 4 vp 0 
            000A: 31@ += 0x3D5 // SERVER_PRESET_OFFSET
            0A8D: 31@ = readMem 31@ sz 4 vp 0
            0A8E: 30@ = 31@ + 0x38 // SHOW_NAME_TAGS_OFFSET
            0A8E: 29@ = 31@ + 0x2F // NAME_TAGS_BEHIND_WALLS_OFFSET
            0A8E: 28@ = 31@ + 0x27 // NAME_TAGS_DISTANCE_OFFSET
            0A8C: writeMem 30@ sz 1 vl 0@ vp 1 
            0A8C: writeMem 29@ sz 1 vl 1@ vp 1
            0A8C: writeMem 28@ sz 4 vl 2@ vp 1
        END
        
        IF 17@ == 6 // 0.3.7 R4 - v2
        THEN 
            0A8E: 31@ = 31@ + 0x26EA0C // SAMP_INFO_OFFSET
            0A8D: 31@ = readMem 31@ sz 4 vp 0 
            000A: 31@ += 0x3D5 // SERVER_PRESET_OFFSET
            0A8D: 31@ = readMem 31@ sz 4 vp 0
            0A8E: 30@ = 31@ + 0x38 // SHOW_NAME_TAGS_OFFSET
            0A8E: 29@ = 31@ + 0x2F // NAME_TAGS_BEHIND_WALLS_OFFSET
            0A8E: 28@ = 31@ + 0x27 // NAME_TAGS_DISTANCE_OFFSET
            0A8C: writeMem 30@ sz 1 vl 0@ vp 1 
            0A8C: writeMem 29@ sz 1 vl 1@ vp 1
            0A8C: writeMem 28@ sz 4 vl 2@ vp 1
        END
        
        IF 17@ == 7 // 0.3.7 R5
        THEN 
            0A8E: 31@ = 31@ + 0x26EB94 // SAMP_INFO_OFFSET
            0A8D: 31@ = readMem 31@ sz 4 vp 0 
            000A: 31@ += 0x3D5 // SERVER_PRESET_OFFSET
            0A8D: 31@ = readMem 31@ sz 4 vp 0
            0A8E: 30@ = 31@ + 0x38 // SHOW_NAME_TAGS_OFFSET
            0A8E: 29@ = 31@ + 0x2F // NAME_TAGS_BEHIND_WALLS_OFFSET
            0A8E: 28@ = 31@ + 0x27 // NAME_TAGS_DISTANCE_OFFSET
            0A8C: writeMem 30@ sz 1 vl 0@ vp 1 
            0A8C: writeMem 29@ sz 1 vl 1@ vp 1
            0A8C: writeMem 28@ sz 4 vl 2@ vp 1
        END
    END
END
0AB2: RET 0
 

Parazitas

God
Staff member
Joined
Jan 2, 2017
Messages
3,315
Solutions
7
Reaction score
935
Location
Lithuania
PHP:
:SAMPSetActorNameTagStatusByPlayerID
{
    0AB1: @SAMPSetActorNameTagStatusByPlayerID 2 PlayerID 995 NameTagStatus 0 // 0 - NameTag Disabled, 1 - NameTag Enabled
    0 - NameTag Disabled
    1 - NameTag Enabled
}
IF 0AA2: 31@ = loadlib "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 // SAMP_INFO_OFFSET
            0A8D: 31@ readMem 31@ sz 4 vp 0
            31@ += 0x3CD // SAMP_PPOOLS_OFFSET
            0A8D: 31@ readMem 31@ sz 4 vp 0
            31@ += 0x18 // SAMP_PPOOL_PLAYER_OFFSET
            0A8D: 31@ readMem 31@ sz 4 vp 0
            0@ *= 0x4 // PLAYER_ID * 4
            0@ += 0x2E // SAMP_REMOTEPLAYER_OFFSET
            005A: 31@ += 0@
            0A8D: 31@ readMem 31@ sz 4 vp 0
            IF 31@ > 0
            THEN
                31@ += 0x0 // SAMP_REMOTEPLAYERDATA_OFFSET
                0A8D: 31@ readMem 31@ sz 4 vp 0
                IF 31@ > 0
                THEN
                    31@ += 0xB3 // SAMP_NAMETAG_STATUS_OFFSET
                    0A8C: writeMem 31@ sz 4 vl 1@ vp 0
                END
            END
        END
        IF 17@ == 2 // 0.3.7 R2
        THEN
            31@ += 0x21A100 // SAMP_INFO_OFFSET
            0A8D: 31@ readMem 31@ sz 4 vp 0
            31@ += 0x3C5 // SAMP_PPOOLS_OFFSET
            0A8D: 31@ readMem 31@ sz 4 vp 0
            31@ += 0x8 // SAMP_PPOOL_PLAYER_OFFSET
            0A8D: 31@ readMem 31@ sz 4 vp 0
            0@ *= 0x4 // PLAYER_ID * 4
            0@ += 0x26 // SAMP_REMOTEPLAYER_OFFSET
            005A: 31@ += 0@
            0A8D: 31@ readMem 31@ sz 4 vp 0
            IF 31@ > 0
            THEN
                31@ += 0xC // SAMP_REMOTEPLAYERDATA_OFFSET
                0A8D: 31@ readMem 31@ sz 4 vp 0
                IF 31@ > 0
                THEN
                    31@ += 0x8 // SAMP_NAMETAG_STATUS_OFFSET
                    0A8C: writeMem 31@ sz 4 vl 1@ vp 0
                END
            END
        END
        IF 17@ == 3 // 0.3.DL
        THEN
            31@ += 0x2ACA24 // SAMP_INFO_OFFSET
            0A8D: 31@ readMem 31@ sz 4 vp 0
            31@ += 0x3DE // SAMP_PPOOLS_OFFSET
            0A8D: 31@ readMem 31@ sz 4 vp 0
            31@ += 0x8 // SAMP_PPOOL_PLAYER_OFFSET
            0A8D: 31@ readMem 31@ sz 4 vp 0
            0@ *= 0x4 // PLAYER_ID * 4
            0@ += 0x26 // SAMP_REMOTEPLAYER_OFFSET
            005A: 31@ += 0@
            0A8D: 31@ readMem 31@ sz 4 vp 0
            IF 31@ > 0
            THEN
                31@ += 0x8 // SAMP_REMOTEPLAYERDATA_OFFSET
                0A8D: 31@ readMem 31@ sz 4 vp 0
                IF 31@ > 0
                THEN
                    31@ += 0x10 // SAMP_NAMETAG_STATUS_OFFSET
                    0A8C: writeMem 31@ sz 4 vl 1@ vp 0
                END
            END
        END
        IF 17@ == 4 // 0.3.7 R3
        THEN
            31@ += 0x26E8DC // SAMP_INFO_OFFSET
            0A8D: 31@ readMem 31@ sz 4 vp 0
            31@ += 0x3DE // SAMP_PPOOLS_OFFSET
            0A8D: 31@ readMem 31@ sz 4 vp 0
            31@ += 0x8 // SAMP_PPOOL_PLAYER_OFFSET
            0A8D: 31@ readMem 31@ sz 4 vp 0
            0@ *= 0x4 // PLAYER_ID * 4
            0@ += 0x4 // SAMP_REMOTEPLAYER_OFFSET
            005A: 31@ += 0@
            0A8D: 31@ readMem 31@ sz 4 vp 0
            IF 31@ > 0
            THEN
                31@ += 0x0 // SAMP_REMOTEPLAYERDATA_OFFSET
                0A8D: 31@ readMem 31@ sz 4 vp 0
                IF 31@ > 0
                THEN
                    31@ += 0x10 // SAMP_NAMETAG_STATUS_OFFSET
                    0A8C: writeMem 31@ sz 4 vl 1@ vp 0
                END
            END
        END
        IF 17@ == 5 // 0.3.7 R4
        THEN
            31@ += 0x26EA0C // SAMP_INFO_OFFSET
            0A8D: 31@ readMem 31@ sz 4 vp 0
            31@ += 0x3DE // SAMP_PPOOLS_OFFSET
            0A8D: 31@ readMem 31@ sz 4 vp 0
            31@ += 0x8 // SAMP_PPOOL_PLAYER_OFFSET
            0A8D: 31@ readMem 31@ sz 4 vp 0
            0@ *= 0x4 // PLAYER_ID * 4
            0@ += 0x2E // SAMP_REMOTEPLAYER_OFFSET
            005A: 31@ += 0@
            0A8D: 31@ readMem 31@ sz 4 vp 0
            IF 31@ > 0
            THEN
                31@ += 0x10 // SAMP_REMOTEPLAYERDATA_OFFSET
                0A8D: 31@ readMem 31@ sz 4 vp 0
                IF 31@ > 0
                THEN
                    31@ += 0x4 // SAMP_NAMETAG_STATUS_OFFSET
                    0A8C: writeMem 31@ sz 4 vl 1@ vp 0
                END
            END
        END
        IF 17@ == 6 // 0.3.7 R4 - v2
        THEN
            31@ += 0x26EA0C // SAMP_INFO_OFFSET
            0A8D: 31@ readMem 31@ sz 4 vp 0
            31@ += 0x3DE // SAMP_PPOOLS_OFFSET
            0A8D: 31@ readMem 31@ sz 4 vp 0
            31@ += 0x4 // SAMP_PPOOL_PLAYER_OFFSET
            0A8D: 31@ readMem 31@ sz 4 vp 0
            0@ *= 0x4 // PLAYER_ID * 4
            0@ += 0x1F8A // SAMP_REMOTEPLAYER_OFFSET
            005A: 31@ += 0@
            0A8D: 31@ readMem 31@ sz 4 vp 0
            IF 31@ > 0
            THEN
                31@ += 0x10 // SAMP_REMOTEPLAYERDATA_OFFSET
                0A8D: 31@ readMem 31@ sz 4 vp 0
                IF 31@ > 0
                THEN
                    31@ += 0x4 // SAMP_NAMETAG_STATUS_OFFSET
                    0A8C: writeMem 31@ sz 4 vl 1@ vp 0
                END
            END
        END
        IF 17@ == 7 // 0.3.7 R5
        THEN
            31@ += 0x26EB94 // SAMP_INFO_OFFSET
            0A8D: 31@ readMem 31@ sz 4 vp 0
            31@ += 0x3DE // SAMP_PPOOLS_OFFSET
            0A8D: 31@ readMem 31@ sz 4 vp 0
            31@ += 0x4 // SAMP_PPOOL_PLAYER_OFFSET
            0A8D: 31@ readMem 31@ sz 4 vp 0
            0@ *= 0x4 // PLAYER_ID * 4
            0@ += 0x1F8A // SAMP_REMOTEPLAYER_OFFSET
            005A: 31@ += 0@
            0A8D: 31@ readMem 31@ sz 4 vp 0
            IF 31@ > 0
            THEN
                31@ += 0x10 // SAMP_REMOTEPLAYERDATA_OFFSET
                0A8D: 31@ readMem 31@ sz 4 vp 0
                IF 31@ > 0
                THEN
                    31@ += 0x4 // SAMP_NAMETAG_STATUS_OFFSET
                    0A8C: writeMem 31@ sz 4 vl 1@ vp 0
                END
            END
        END
        0AA3: freelib 31@
    END
END
0AB2: ret 0
 

Parazitas

God
Staff member
Joined
Jan 2, 2017
Messages
3,315
Solutions
7
Reaction score
935
Location
Lithuania
Make your own NameTag?
It will disable server name tag settings and make everything visible through walls and max distance
PHP:
:NameTagsNopping
// 0AB1: @NameTagsNopping 1 StateNOP? TRUE
IF 0AA2: 31@ = "samp.dll" // IF and SET
THEN
    0AB1: @get_samp_version_id 0 _returned: ID 17@
    IF 17@ > 0
    THEN
        IF 0@ == TRUE
        THEN
            IF 17@ == 1 // 0.3.7 R1
            THEN
                0A8E: 30@ = 31@ + 0x6FCF3 //
                0A8C: write_memory 30@ size 6 value 0x909090909090 virtual_protect 1
                0A8E: 29@ = 31@ + 0x6FD14 //
                0A8C: write_memory 29@ size 6 value 0x909090909090 virtual_protect 1
                0A8E: 28@ = 31@ + 0x6FE28 //
                0A8C: write_memory 28@ size 2 value 0x9090 virtual_protect 1
                0A8E: 27@ = 31@ + 0x70F38 //
                0A8C: write_memory 27@ size 2 value 0x9090 virtual_protect 1
                0A8E: 26@ = 31@ + 0x70E24 //
                0A8C: write_memory 26@ size 6 value 0x909090909090 virtual_protect 1
            END
            IF 17@ == 2 // 0.3.7 R2
            THEN
                0A8E: 30@ = 31@ + 0x6FD92 //
                0A8C: write_memory 30@ size 6 value 0x909090909090 virtual_protect 1
                0A8E: 29@ = 31@ + 0x6FDB3 //
                0A8C: write_memory 29@ size 6 value 0x909090909090 virtual_protect 1
                0A8E: 28@ = 31@ + 0x6FEC7 //
                0A8C: write_memory 28@ size 2 value 0x9090 virtual_protect 1
                0A8E: 27@ = 31@ + 0x70FD7 //
                0A8C: write_memory 27@ size 2 value 0x9090 virtual_protect 1
                0A8E: 26@ = 31@ + 0x70EC3 //
                0A8C: write_memory 26@ size 6 value 0x909090909090 virtual_protect 1
            END
        
            IF 17@ == 3 // 0.3.DL
            THEN
                0A8E: 30@ = 31@ + 0x73D72 //
                0A8C: write_memory 30@ size 6 value 0x909090909090 virtual_protect 1
                0A8E: 29@ = 31@ + 0x73D93 //
                0A8C: write_memory 29@ size 6 value 0x909090909090 virtual_protect 1
                0A8E: 28@ = 31@ + 0x73EA7 //
                0A8C: write_memory 28@ size 2 value 0x9090 virtual_protect 1
                0A8E: 27@ = 31@ + 0x74FB7 //
                0A8C: write_memory 27@ size 2 value 0x9090 virtual_protect 1
                0A8E: 26@ = 31@ + 0x74EA3 //
                0A8C: write_memory 26@ size 6 value 0x909090909090 virtual_protect 1
            END
        
            IF 17@ == 4 // 0.3.7 R3
            THEN
                0A8E: 30@ = 31@ + 0x73BDF //
                0A8C: write_memory 30@ size 6 value 0x909090909090 virtual_protect 1
                0A8E: 29@ = 31@ + 0x73BFF //
                0A8C: write_memory 29@ size 6 value 0x909090909090 virtual_protect 1
                0A8E: 28@ = 31@ + 0x73D19 //
                0A8C: write_memory 28@ size 2 value 0x9090 virtual_protect 1
                0A8E: 27@ = 31@ + 0x74E29 //
                0A8C: write_memory 27@ size 2 value 0x9090 virtual_protect 1
                0A8E: 26@ = 31@ + 0x74D0F //
                0A8C: write_memory 26@ size 6 value 0x909090909090 virtual_protect 1
            END
        
            IF 17@ == 5 // 0.3.7 R4
            THEN
                0A8E: 30@ = 31@ + 0x74308 //
                0A8C: write_memory 30@ size 6 value 0x909090909090 virtual_protect 1
                0A8E: 29@ = 31@ + 0x74329 //
                0A8C: write_memory 29@ size 6 value 0x909090909090 virtual_protect 1
                0A8E: 28@ = 31@ + 0x74446 //
                0A8C: write_memory 28@ size 2 value 0x9090 virtual_protect 1
                0A8E: 27@ = 31@ + 0x75566 //
                0A8C: write_memory 27@ size 2 value 0x9090 virtual_protect 1
                0A8E: 26@ = 31@ + 0x75449 //
                0A8C: write_memory 26@ size 6 value 0x909090909090 virtual_protect 1
            END
        
            IF 17@ == 6 // 0.3.7 R4 - v2
            THEN
                0A8E: 30@ = 31@ + 0x74338 //
                0A8C: write_memory 30@ size 6 value 0x909090909090 virtual_protect 1
                0A8E: 29@ = 31@ + 0x74359 //
                0A8C: write_memory 29@ size 6 value 0x909090909090 virtual_protect 1
                0A8E: 28@ = 31@ + 0x74476 //
                0A8C: write_memory 28@ size 2 value 0x9090 virtual_protect 1
                0A8E: 27@ = 31@ + 0x75596 //
                0A8C: write_memory 27@ size 2 value 0x9090 virtual_protect 1
                0A8E: 26@ = 31@ + 0x75479 //
                0A8C: write_memory 26@ size 6 value 0x909090909090 virtual_protect 1
            END
        
            IF 17@ == 7 // 0.3.7 R5
            THEN
                0A8E: 30@ = 31@ + 0x742D8 //
                0A8C: write_memory 30@ size 6 value 0x909090909090 virtual_protect 1
                0A8E: 29@ = 31@ + 0x742F9 //
                0A8C: write_memory 29@ size 6 value 0x909090909090 virtual_protect 1
                0A8E: 28@ = 31@ + 0x74416 //
                0A8C: write_memory 28@ size 2 value 0x9090 virtual_protect 1
                0A8E: 27@ = 31@ + 0x75536 //
                0A8C: write_memory 27@ size 2 value 0x9090 virtual_protect 1
                0A8E: 26@ = 31@ + 0x75419 //
                0A8C: write_memory 26@ size 6 value 0x909090909090 virtual_protect 1
            END
        ELSE // FALSE
            IF 17@ == 1 // 0.3.7 R1
            THEN
                0A8E: 30@ = 31@ + 0x6FCF3 //
                0A8C: write_memory 30@ size 4 value 0x0171840F virtual_protect 1
                30@ += 4
                0A8C: write_memory 30@ size 2 value 0x0000 virtual_protect 1
                0A8E: 29@ = 31@ + 0x6FD14 //
                0A8C: write_memory 29@ size 4 value 0x01508A0F virtual_protect 1
                29@ += 4
                0A8C: write_memory 29@ size 2 value 0x0000 virtual_protect 1
                0A8E: 28@ = 31@ + 0x6FE28 //
                0A8C: write_memory 28@ size 2 value 0x4074 virtual_protect 1
                0A8E: 27@ = 31@ + 0x70F38 //
                0A8C: write_memory 27@ size 2 value 0x6174 virtual_protect 1
                0A8E: 26@ = 31@ + 0x70E24 //
                0A8C: write_memory 26@ size 4 value 0x01718A0F virtual_protect 1
                26@ += 4
                0A8C: write_memory 26@ size 2 value 0x0000 virtual_protect 1
            END
            IF 17@ == 2 // 0.3.7 R2
            THEN
                0A8E: 30@ = 31@ + 0x6FD92 //
                0A8C: write_memory 30@ size 4 value 0x0171840F virtual_protect 1
                30@ += 4
                0A8C: write_memory 30@ size 2 value 0x0000 virtual_protect 1
                0A8E: 29@ = 31@ + 0x6FDB3 //
                0A8C: write_memory 29@ size 4 value 0x0150840F virtual_protect 1
                29@ += 4
                0A8C: write_memory 29@ size 2 value 0x0000 virtual_protect 1
                0A8E: 28@ = 31@ + 0x6FEC7 //
                0A8C: write_memory 28@ size 2 value 0x4074 virtual_protect 1
                0A8E: 27@ = 31@ + 0x70FD7 //
                0A8C: write_memory 27@ size 2 value 0x6174 virtual_protect 1
                0A8E: 26@ = 31@ + 0x70EC3 //
                0A8C: write_memory 26@ size 4 value 0x01718A0F virtual_protect 1
                26@ += 4
                0A8C: write_memory 26@ size 2 value 0x0000 virtual_protect 1
            END
        
            IF 17@ == 3 // 0.3.DL
            THEN
                0A8E: 30@ = 31@ + 0x73D72 //
                0A8C: write_memory 30@ size 4 value 0x0171840F virtual_protect 1
                30@ += 4
                0A8C: write_memory 30@ size 2 value 0x0000 virtual_protect 1
                0A8E: 29@ = 31@ + 0x73D93 //
                0A8C: write_memory 29@ size 4 value 0x01508A0F virtual_protect 1
                29@ += 4
                0A8C: write_memory 29@ size 2 value 0x0000 virtual_protect 1
                0A8E: 28@ = 31@ + 0x73EA7 //
                0A8C: write_memory 28@ size 2 value 0x4074 virtual_protect 1
                0A8E: 27@ = 31@ + 0x74FB7 //
                0A8C: write_memory 27@ size 2 value 0x6174 virtual_protect 1
                0A8E: 26@ = 31@ + 0x74EA3 //
                0A8C: write_memory 26@ size 4 value 0x01718A0F virtual_protect 1
                26@ += 4
                0A8C: write_memory 26@ size 2 value 0x0000 virtual_protect 1
            END
        
            IF 17@ == 4 // 0.3.7 R3
            THEN
                0A8E: 30@ = 31@ + 0x73BDF //
                0A8C: write_memory 30@ size 4 value 0x0179840F virtual_protect 1
                30@ += 4
                0A8C: write_memory 30@ size 2 value 0x0000 virtual_protect 1
                0A8E: 29@ = 31@ + 0x73BFF //
                0A8C: write_memory 29@ size 4 value 0x01598A0F virtual_protect 1
                29@ += 4
                0A8C: write_memory 29@ size 2 value 0x0000 virtual_protect 1
                0A8E: 28@ = 31@ + 0x73D19 //
                0A8C: write_memory 28@ size 2 value 0x4374 virtual_protect 1
                0A8E: 27@ = 31@ + 0x74E29 //
                0A8C: write_memory 27@ size 2 value 0x6474 virtual_protect 1
                0A8E: 26@ = 31@ + 0x74D0F //
                0A8C: write_memory 26@ size 4 value 0x017A8A0F virtual_protect 1
                26@ += 4
                0A8C: write_memory 26@ size 2 value 0x0000 virtual_protect 1
            END
        
            IF 17@ == 5 // 0.3.7 R4
            THEN
                0A8E: 30@ = 31@ + 0x74308 //
                0A8C: write_memory 30@ size 4 value 0x017D840F virtual_protect 1
                30@ += 4
                0A8C: write_memory 30@ size 2 value 0x0000 virtual_protect 1
                0A8E: 29@ = 31@ + 0x74329 //
                0A8C: write_memory 29@ size 4 value 0x015C8A0F virtual_protect 1
                29@ += 4
                0A8C: write_memory 29@ size 2 value 0x0000 virtual_protect 1
                0A8E: 28@ = 31@ + 0x74446 //
                0A8C: write_memory 28@ size 2 value 0x4374 virtual_protect 1
                0A8E: 27@ = 31@ + 0x75566 //
                0A8C: write_memory 27@ size 2 value 0x6474 virtual_protect 1
                0A8E: 26@ = 31@ + 0x75449 //
                0A8C: write_memory 26@ size 4 value 0x017D8A0F virtual_protect 1
                26@ += 4
                0A8C: write_memory 26@ size 2 value 0x0000 virtual_protect 1
            END
        
            IF 17@ == 6 // 0.3.7 R4 - v2
            THEN
                0A8E: 30@ = 31@ + 0x74338 //
                0A8C: write_memory 30@ size 4 value 0x017D840F virtual_protect 1
                30@ += 4
                0A8C: write_memory 30@ size 2 value 0x0000 virtual_protect 1
                0A8E: 29@ = 31@ + 0x74359 //
                0A8C: write_memory 29@ size 4 value 0x015C8A0F virtual_protect 1
                29@ += 4
                0A8C: write_memory 29@ size 2 value 0x0000 virtual_protect 1
                0A8E: 28@ = 31@ + 0x74476 //
                0A8C: write_memory 28@ size 2 value 0x4374 virtual_protect 1
                0A8E: 27@ = 31@ + 0x75596 //
                0A8C: write_memory 27@ size 2 value 0x6474 virtual_protect 1
                0A8E: 26@ = 31@ + 0x75479 //
                0A8C: write_memory 26@ size 4 value 0x017D8A0F virtual_protect 1
                26@ += 4
                0A8C: write_memory 26@ size 2 value 0x0000 virtual_protect 1
            END
        
            IF 17@ == 7 // 0.3.7 R5
            THEN
                0A8E: 30@ = 31@ + 0x742D8 //
                0A8C: write_memory 30@ size 4 value 0x017D840F virtual_protect 1
                30@ += 4
                0A8C: write_memory 30@ size 2 value 0x0000 virtual_protect 1
                0A8E: 29@ = 31@ + 0x742F9 //
                0A8C: write_memory 29@ size 4 value 0x015C8A0F virtual_protect 1
                29@ += 4
                0A8C: write_memory 29@ size 2 value 0x0000 virtual_protect 1
                0A8E: 28@ = 31@ + 0x74416 //
                0A8C: write_memory 28@ size 2 value 0x4374 virtual_protect 1
                0A8E: 27@ = 31@ + 0x75536 //
                0A8C: write_memory 27@ size 2 value 0x6474 virtual_protect 1
                0A8E: 26@ = 31@ + 0x75419 //
                0A8C: write_memory 26@ size 4 value 0x017D8A0F virtual_protect 1
                26@ += 4
                0A8C: write_memory 26@ size 2 value 0x0000 virtual_protect 1
            END
        END 
    END
    0AA3: free_library 31@
END
0AB2: ret 0
 

Parazitas

God
Staff member
Joined
Jan 2, 2017
Messages
3,315
Solutions
7
Reaction score
935
Location
Lithuania
PHP:
:isAttachedObjectExist
{
    MAX ATTACHED OBJECTS = 10
    IF 0AB1: @isAttachedObjectExist 1 ID: 0@
}
IF 0AA2: 31@ = loadlib "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 // SAMP_INFO_OFFSET
            0A8D: 31@ = readmem 31@ sz 4 vp 1
            31@ += 0x3CD // SAMP_POOLS_OFFSET
            0A8D: 31@ = readmem 31@ sz 4 vp 1
            31@ += 0x18 // SAMP_POOL_PLAYER_OFFSET
            0A8D: 31@ = readmem 31@ sz 4 vp 1
            31@ += 0x22 // SAMP_LOCAL_PLAYER_OFFSET
            0A8D: 31@ readMem 31@ sz 4 vp 1
            31@ += 0x0 // SAMP_ACTOR_OFFSET
            0A8D: 31@ readMem 31@ sz 4 vp 1
            0@ *= 4
            0@ += 0x4C // SAMP_ATTACHED_OBJECT_EXIST
            005A: 31@ += 0@  // (int)
            0A8D: 30@ readMem 31@ sz 4 vp 1
        END
        IF 17@ == 2 // 0.3.7 R2
        THEN
            31@ += 0x21A100 // SAMP_INFO_OFFSET
            0A8D: 31@ = readmem 31@ sz 4 vp 1
            31@ += 0x3C5 // SAMP_POOLS_OFFSET
            0A8D: 31@ = readmem 31@ sz 4 vp 1
            31@ += 0x8 // SAMP_POOL_PLAYER_OFFSET
            0A8D: 31@ = readmem 31@ sz 4 vp 1
            31@ += 0x1E // SAMP_LOCAL_PLAYER_OFFSET
            0A8D: 31@ readMem 31@ sz 4 vp 1
            31@ += 0x0 // SAMP_ACTOR_OFFSET
            0A8D: 31@ readMem 31@ sz 4 vp 1
            0@ *= 4
            0@ += 0x4C // SAMP_ATTACHED_OBJECT_EXIST
            005A: 31@ += 0@  // (int)
            0A8D: 30@ readMem 31@ sz 4 vp 1
        END
        IF 17@ == 3 // 0.3.DL
        THEN
            31@ += 0x2ACA24 // SAMP_INFO_OFFSET
            0A8D: 31@ = readmem 31@ sz 4 vp 1
            31@ += 0x3DE // SAMP_POOLS_OFFSET
            0A8D: 31@ = readmem 31@ sz 4 vp 1
            31@ += 0x8 // SAMP_POOL_PLAYER_OFFSET
            0A8D: 31@ = readmem 31@ sz 4 vp 1
            31@ += 0x1E // SAMP_LOCAL_PLAYER_OFFSET
            0A8D: 31@ readMem 31@ sz 4 vp 1
            31@ += 0x0 // SAMP_ACTOR_OFFSET
            0A8D: 31@ readMem 31@ sz 4 vp 1
            0@ *= 4
            0@ += 0x4C // SAMP_ATTACHED_OBJECT_EXIST
            005A: 31@ += 0@  // (int)
            0A8D: 30@ readMem 31@ sz 4 vp 1
        END
        IF 17@ == 4 // 0.3.7 R3 
        THEN
            31@ += 0x26E8DC // SAMP_INFO_OFFSET
            0A8D: 31@ = readmem 31@ sz 4 vp 1
            31@ += 0x3DE // SAMP_POOLS_OFFSET
            0A8D: 31@ = readmem 31@ sz 4 vp 1
            31@ += 0x8 // SAMP_POOL_PLAYER_OFFSET
            0A8D: 31@ = readmem 31@ sz 4 vp 1
            31@ += 0x2F3A // SAMP_LOCAL_PLAYER_OFFSET
            0A8D: 31@ readMem 31@ sz 4 vp 1
            31@ += 0x0 // SAMP_ACTOR_OFFSET
            0A8D: 31@ readMem 31@ sz 4 vp 1
            0@ *= 4
            0@ += 0x4C // SAMP_ATTACHED_OBJECT_EXIST
            005A: 31@ += 0@  // (int)
            0A8D: 30@ readMem 31@ sz 4 vp 1
        END
        IF 17@ == 5 // 0.3.7 R4
        THEN
            31@ += 0x26EA0C // SAMP_INFO_OFFSET
            0A8D: 31@ = readmem 31@ sz 4 vp 1
            31@ += 0x3DE // SAMP_POOLS_OFFSET
            0A8D: 31@ = readmem 31@ sz 4 vp 1
            31@ += 0x8 // SAMP_POOL_PLAYER_OFFSET
            0A8D: 31@ = readmem 31@ sz 4 vp 1
            31@ += 0x2A // SAMP_LOCAL_PLAYER_OFFSET
            0A8D: 31@ readMem 31@ sz 4 vp 1
            31@ += 0x104 // SAMP_ACTOR_OFFSET
            0A8D: 31@ readMem 31@ sz 4 vp 1
            0@ *= 4
            0@ += 0x4C // SAMP_ATTACHED_OBJECT_EXIST
            005A: 31@ += 0@  // (int)
            0A8D: 30@ readMem 31@ sz 4 vp 1
        END
        IF 17@ == 6 // 0.3.7 R4 - v2
        THEN
            31@ += 0x26EA0C // SAMP_INFO_OFFSET
            0A8D: 31@ = readmem 31@ sz 4 vp 1
            31@ += 0x3DE // SAMP_POOLS_OFFSET
            0A8D: 31@ = readmem 31@ sz 4 vp 1
            31@ += 0x4 // SAMP_POOL_PLAYER_OFFSET
            0A8D: 31@ = readmem 31@ sz 4 vp 1
            31@ += 0x26 // SAMP_LOCAL_PLAYER_OFFSET
            0A8D: 31@ readMem 31@ sz 4 vp 1
            31@ += 0x104 // SAMP_ACTOR_OFFSET
            0A8D: 31@ readMem 31@ sz 4 vp 1
            0@ *= 4
            0@ += 0x4C // SAMP_ATTACHED_OBJECT_EXIST
            005A: 31@ += 0@  // (int)
            0A8D: 30@ readMem 31@ sz 4 vp 1
        END
        IF 17@ == 7 // 0.3.7 R5
        THEN
            31@ += 0x26EB94 // SAMP_INFO_OFFSET
            0A8D: 31@ = readmem 31@ sz 4 vp 1
            31@ += 0x3DE // SAMP_POOLS_OFFSET
            0A8D: 31@ = readmem 31@ sz 4 vp 1
            31@ += 0x4 // SAMP_POOL_PLAYER_OFFSET
            0A8D: 31@ = readmem 31@ sz 4 vp 1
            31@ += 0x26 // SAMP_LOCAL_PLAYER_OFFSET
            0A8D: 31@ readMem 31@ sz 4 vp 1
            31@ += 0x104 // SAMP_ACTOR_OFFSET
            0A8D: 31@ readMem 31@ sz 4 vp 1
            0@ *= 4
            0@ += 0x4C // SAMP_ATTACHED_OBJECT_EXIST
            005A: 31@ += 0@  // (int)
            0A8D: 30@ readMem 31@ sz 4 vp 1
        END
        IF 30@ > 0
        THEN 0485:  return_true
        ELSE 059A:  return_false
        END
        0AA3: freelib 31@
    END
END
0AB2: ret 0
 

Parazitas

God
Staff member
Joined
Jan 2, 2017
Messages
3,315
Solutions
7
Reaction score
935
Location
Lithuania
PHP:
:GetAttachedObjectHandle
{
    MAX ATTACHED OBJECTS = 10
    IF 0AB1: @GetAttachedObjectHandle 1 ID: 0@ _Returned: Handle 1@
}
IF 0AA2: 31@ = loadlib "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 // SAMP_INFO_OFFSET
            0A8D: 31@ = readmem 31@ sz 4 vp 1
            31@ += 0x3CD // SAMP_POOLS_OFFSET
            0A8D: 31@ = readmem 31@ sz 4 vp 1
            31@ += 0x18 // SAMP_POOL_PLAYER_OFFSET
            0A8D: 31@ = readmem 31@ sz 4 vp 1
            31@ += 0x22 // SAMP_LOCAL_PLAYER_OFFSET
            0A8D: 31@ readMem 31@ sz 4 vp 1
            31@ += 0x0 // SAMP_ACTOR_OFFSET
            0A8D: 31@ readMem 31@ sz 4 vp 1
            0@ *= 4
            0@ += 0x4C // SAMP_ATTACHED_OBJECT_EXIST
            005A: 31@ += 0@  // (int)
            0A8D: 30@ readMem 31@ sz 1 vp 1
        END
        IF 17@ == 2 // 0.3.7 R2
        THEN
            31@ += 0x21A100 // SAMP_INFO_OFFSET
            0A8D: 31@ = readmem 31@ sz 4 vp 1
            31@ += 0x3C5 // SAMP_POOLS_OFFSET
            0A8D: 31@ = readmem 31@ sz 4 vp 1
            31@ += 0x8 // SAMP_POOL_PLAYER_OFFSET
            0A8D: 31@ = readmem 31@ sz 4 vp 1
            31@ += 0x1E // SAMP_LOCAL_PLAYER_OFFSET
            0A8D: 31@ readMem 31@ sz 4 vp 1
            31@ += 0x0 // SAMP_ACTOR_OFFSET
            0A8D: 31@ readMem 31@ sz 4 vp 1
            0@ *= 4
            0@ += 0x4C // SAMP_ATTACHED_OBJECT_EXIST
            005A: 31@ += 0@  // (int)
            0A8D: 30@ readMem 31@ sz 1 vp 1
        END
        IF 17@ == 3 // 0.3.DL
        THEN
            31@ += 0x2ACA24 // SAMP_INFO_OFFSET
            0A8D: 31@ = readmem 31@ sz 4 vp 1
            31@ += 0x3DE // SAMP_POOLS_OFFSET
            0A8D: 31@ = readmem 31@ sz 4 vp 1
            31@ += 0x8 // SAMP_POOL_PLAYER_OFFSET
            0A8D: 31@ = readmem 31@ sz 4 vp 1
            31@ += 0x1E // SAMP_LOCAL_PLAYER_OFFSET
            0A8D: 31@ readMem 31@ sz 4 vp 1
            31@ += 0x0 // SAMP_ACTOR_OFFSET
            0A8D: 31@ readMem 31@ sz 4 vp 1
            0@ *= 4
            0@ += 0x4C // SAMP_ATTACHED_OBJECT_EXIST
            005A: 31@ += 0@  // (int)
            0A8D: 30@ readMem 31@ sz 1 vp 1
        END
        IF 17@ == 4 // 0.3.7 R3 
        THEN
            31@ += 0x26E8DC // SAMP_INFO_OFFSET
            0A8D: 31@ = readmem 31@ sz 4 vp 1
            31@ += 0x3DE // SAMP_POOLS_OFFSET
            0A8D: 31@ = readmem 31@ sz 4 vp 1
            31@ += 0x8 // SAMP_POOL_PLAYER_OFFSET
            0A8D: 31@ = readmem 31@ sz 4 vp 1
            31@ += 0x2F3A // SAMP_LOCAL_PLAYER_OFFSET
            0A8D: 31@ readMem 31@ sz 4 vp 1
            31@ += 0x0 // SAMP_ACTOR_OFFSET
            0A8D: 31@ readMem 31@ sz 4 vp 1
            0@ *= 4
            0@ += 0x4C // SAMP_ATTACHED_OBJECT_EXIST
            005A: 31@ += 0@  // (int)
            0A8D: 30@ readMem 31@ sz 1 vp 1
        END
        IF 17@ == 5 // 0.3.7 R4
        THEN
            31@ += 0x26EA0C // SAMP_INFO_OFFSET
            0A8D: 31@ = readmem 31@ sz 4 vp 1
            31@ += 0x3DE // SAMP_POOLS_OFFSET
            0A8D: 31@ = readmem 31@ sz 4 vp 1
            31@ += 0x8 // SAMP_POOL_PLAYER_OFFSET
            0A8D: 31@ = readmem 31@ sz 4 vp 1
            31@ += 0x2A // SAMP_LOCAL_PLAYER_OFFSET
            0A8D: 31@ readMem 31@ sz 4 vp 1
            31@ += 0x104 // SAMP_ACTOR_OFFSET
            0A8D: 31@ readMem 31@ sz 4 vp 1
            0@ *= 4
            0@ += 0x4C // SAMP_ATTACHED_OBJECT_EXIST
            005A: 31@ += 0@  // (int)
            0A8D: 30@ readMem 31@ sz 1 vp 1
        END
        IF 17@ == 6 // 0.3.7 R4 - v2
        THEN
            31@ += 0x26EA0C // SAMP_INFO_OFFSET
            0A8D: 31@ = readmem 31@ sz 4 vp 1
            31@ += 0x3DE // SAMP_POOLS_OFFSET
            0A8D: 31@ = readmem 31@ sz 4 vp 1
            31@ += 0x4 // SAMP_POOL_PLAYER_OFFSET
            0A8D: 31@ = readmem 31@ sz 4 vp 1
            31@ += 0x26 // SAMP_LOCAL_PLAYER_OFFSET
            0A8D: 31@ readMem 31@ sz 4 vp 1
            31@ += 0x104 // SAMP_ACTOR_OFFSET
            0A8D: 31@ readMem 31@ sz 4 vp 1
            0@ *= 4
            0@ += 0x4C // SAMP_ATTACHED_OBJECT_EXIST
            005A: 31@ += 0@  // (int)
            0A8D: 30@ readMem 31@ sz 1 vp 1
        END
        IF 17@ == 7 // 0.3.7 R5
        THEN
            31@ += 0x26EB94 // SAMP_INFO_OFFSET
            0A8D: 31@ = readmem 31@ sz 4 vp 1
            31@ += 0x3DE // SAMP_POOLS_OFFSET
            0A8D: 31@ = readmem 31@ sz 4 vp 1
            31@ += 0x4 // SAMP_POOL_PLAYER_OFFSET
            0A8D: 31@ = readmem 31@ sz 4 vp 1
            31@ += 0x26 // SAMP_LOCAL_PLAYER_OFFSET
            0A8D: 31@ readMem 31@ sz 4 vp 1
            31@ += 0x104 // SAMP_ACTOR_OFFSET
            0A8D: 31@ readMem 31@ sz 4 vp 1
            0@ *= 4
            0@ += 0x4C // SAMP_ATTACHED_OBJECT_EXIST
            005A: 31@ += 0@  // (int)
            0A8D: 30@ readMem 31@ sz 1 vp 1
        END
        IF 30@ > 0
        THEN 
            0485:  return_true
            0A8D: 31@ readMem 31@ sz 4 vp 1
            31@ += 0x44 // SAMP_OBJECT_HANDLE_OFFSET 
            0A8D: 30@ readMem 31@ sz 4 vp 1
            0AB2: ret 1 30@
        ELSE 059A:  return_false
        END
        0AA3: freelib 31@
    END
END
0AB2: ret 1 0
 

Parazitas

God
Staff member
Joined
Jan 2, 2017
Messages
3,315
Solutions
7
Reaction score
935
Location
Lithuania
PHP:
:Say
{
    0AC8: 0@ = allocate_memory_size 144
    0AD3: 0@ = format "/big potato"
    0AB1: @Say 1 TextOrCommand 0@
    0AC9: free_allocated_memory 0@
}
IF 0AA2: 31@ = "samp.dll"
THEN
    0AB1: @get_samp_version_id 0 _returned: ID 27@
    IF 27@ > 0
    THEN
        IF 27@ == 1 // 0.3.7 R1
        THEN
            0A8E: 30@ = 31@ + 0x65C60 // SAMP_SEND_CMD_OFFSET
            0A8E: 29@ = 31@ + 0x57F0 // SAMP_SEND_SAY_OFFSET
        END
        IF 27@ == 2 // 0.3.7 R2
        THEN
            0A8E: 30@ = 31@ + 0x65D30 // SAMP_SEND_CMD_OFFSET
            0A8E: 29@ = 31@ + 0x57E0 // SAMP_SEND_SAY_OFFSET
        END
    
        IF 27@ == 3 // 0.3.DL
        THEN
            0A8E: 30@ = 31@ + 0x69340 // SAMP_SEND_CMD_OFFSET
            0A8E: 29@ = 31@ + 0x5860 // SAMP_SEND_SAY_OFFSET
        END
    
        IF 27@ == 4 // 0.3.7 R3
        THEN
            0A8E: 30@ = 31@ + 0x69190 // SAMP_SEND_CMD_OFFSET
            0A8E: 29@ = 31@ + 0x5820 // SAMP_SEND_SAY_OFFSET
        END
    
        IF 27@ == 5 // 0.3.7 R4
        THEN
            0A8E: 30@ = 31@ + 0x698C0 // SAMP_SEND_CMD_OFFSET
            0A8E: 29@ = 31@ + 0x5A00 // SAMP_SEND_SAY_OFFSET
        END
    
        IF 27@ == 6 // 0.3.7 R4 - v2
        THEN
            0A8E: 30@ = 31@ + 0x69900 // SAMP_SEND_CMD_OFFSET
            0A8E: 29@ = 31@ + 0x5A10 // SAMP_SEND_SAY_OFFSET
        END

        IF 27@ == 7 // 0.3.7 R5
        THEN
            0A8E: 30@ = 31@ + 0x69900 // SAMP_SEND_CMD_OFFSET
            0A8E: 29@ = 31@ + 0x5A10 // SAMP_SEND_SAY_OFFSET
        END
        0085: 28@ = 0@ // COPY TEXT
        0A8D: 27@ = read_memory 28@ size 1 virtual_protect 1
        IF 27@ == 47 // 47 = /
        THEN 0AA5: call 30@ num_param 1 pop 0 0@ // SEND CMD
        ELSE 0AA5: call 29@ num_param 1 pop 0 0@ // SEND SAY
        END
    END
    0AA3: freelib 31@
END
0AB2: 0
 
Status
Not open for further replies.
Top