[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:
:get_samp_version_id
// 0AB1: @get_samp_version_id 0 _returned: ID 0@
30@ = 0
IF 0AA2: 31@ = "samp.dll" // IF and SET
THEN
    31@ += 0x128
    0A8D: 29@ = read_memory 31@ size 4 virtual_protect 1
    IF 29@ == 0x5542F47A
    THEN // 0.3.7 R1
        30@ = 1
    END
 
    IF 29@ == 0x59C30C94
    THEN // 0.3.7 R2
        30@ = 2
    END
 
    IF 29@ == 0x5A6A3130
    THEN // 0.3.DL
        30@ = 3
    END
    31@ -= 8 // reading samp.dll + 0x120
    0A8D: 29@ = read_memory 31@ size 4 virtual_protect 1
    IF 29@ == 0x5C0B4243
    THEN // 0.3.7 R3
        30@ = 4
    END
 
    IF 29@ == 0x5DD606CD
    THEN // 0.3.7 R4
        30@ = 5
    END
    IF 29@ == 0x6094ACAB
    THEN // 0.3.7 R4 - v2
        30@ = 6
    END
    IF 29@ == 0x6372C39E
    THEN // 0.3.7 R5
        30@ = 7
    END
0AA3: freelib 31@
END
0AB2: ret 1 30@
PHP:
:registerClientCommand
{
    Credits:
        Parazitas - UGBASE
        kawa_operand - BlastHack
        ajom - UGBASE
 
    Usage:
    0AC8: 31@ = allocate_memory_size 1024
    0AD3: 31@ = string_format "vr"
    0AC7: 30@ = var 30@ pointer
    0AC7: 29@ = var 29@ pointer
    0AB1: @registerClientCommand 3 _CommandName 31@ _TogglingVar 30@ _ParamsPtrToVar 29@
    30@ = 0 // default disabled
    29@ = 0 // null ptr
 
    Note:
        The Reference Pointers passed at _TogglingVar and _ParamPtrToVar are required to be treated as ReadOnly. Which means that the value of those two Reference Pointers should not be manually overwritten/changed.

    I am having a problem with opcode 0AB1, it permanently writes on the main thread's local variables. Maybe its because I directly writes on the passed variable's memory pointer. An example case:
        Passing _ParamPtrToVar = 31@ , _TogglingVar = 30@
            Opcode 0AB1 31@ == Main Thread's 31@
            Opcode 0AB1 30@ == Main Thread's 30@

    Thats why I decided to use global variables since they aren't that exposed on scripts.
}
CONST
    //    WARNING:
    //        Do not use Local Variables
    //        Do not recycle/use the three variables on any operation inside the script because these variables will always be used by this function and doesn't override outside the function. I promise you that even if you replace this with a local variable, It will cause overwriting mistakes that will mess the operation
    // You can Replace any of these variables into any UNIQUE GLOBAL VARIABLES
    VAR1 = $2AFD
    VAR2 = $2BEC
    VAR3 = $2CDE
    VAR4 = $2DCB
    VAR5 = $2EBF
    VAR6 = $2FAA
END
IF 0AA2: VAR4 = "samp.dll"
THEN
        // ~~~~~~~~~~~~~ Create a New Callback Structure
        {
            51                      // push     ecx
            56                      // push     esi
            8B 74 24 0C             // mov     esi, [esp+0Ch]
            89 34 25 11 11 11 11    // mov     [11111111], esi // later: [11111111] becomes 1@
            83 35 11 11 11 11 01    // xor     [11111111], 01 // later: [11111111] becomes 2@
            5E                      // pop     esi
            59                      // pop     ecx
            C3 // retn
        }
            // Avoid using local variables by saving the values inside a global variables
    008A: VAR1 = 0@
    008A: VAR2 = 2@
    008A: VAR3 = 1@
            //
    0AC8: VAR5 = allocate_memory_size 23 // undeleteable memory region
    0084: VAR6 = VAR5
    0A8C: write_memory VAR6 size 4 value 0x748B5651 virtual_protect 1
    VAR6 += 4
    0A8C: write_memory VAR6 size 4 value 0x34890C24 virtual_protect 1
    VAR6 += 4
    0A8C: write_memory VAR6 size 1 value 0x25 virtual_protect 1
    VAR6++
    // 0A8C: write_memory VAR2 size 4 value 0 virtual_protect 0 // null string // NOT WORKING due to this function's varibles overriding
    0A8C: write_memory VAR6 size 4 value VAR2 virtual_protect 1
    VAR6 += 4
    0A8C: write_memory VAR6 size 2 value 0x3583 virtual_protect 1
    VAR6 += 2
    // 0A8C: write_memory VAR3 size 4 value 0 virtual_protect 0 // Zeroing TogglingVar // NOT WORKING due to this function's varibles overriding
    0A8C: write_memory VAR6 size 4 value VAR3 virtual_protect 1
    VAR6 += 4
    0A8C: write_memory VAR6 size 4 value 0xC3595E01 virtual_protect 1
        // ~~~~~~~~~~~~~ now callback struct VAR5 is ready
    0AB1: @get_samp_version_id 0 _returned: ID 17@
    IF 17@ > 0
    THEN
        IF 17@ == 1 // 0.3.7 R1
        THEN
            0A8E: VAR6 = VAR4 + 0x21A0E8 // SAMP_CHAT_INPUT_INFO_OFFSET
            0A8D: VAR6 = read_memory VAR6 size 4 virtual_protect 1
            VAR4 += 0x65AD0 // SAMP_REGISTER_CLIENT_CMD_OFFSET
        END
        IF 17@ == 2 // 0.3.7 R2
        THEN
            0A8E: VAR6 = VAR4 + 0x21A0F0 // SAMP_CHAT_INPUT_INFO_OFFSET
            0A8D: VAR6 = read_memory VAR6 size 4 virtual_protect 1
            VAR4 += 0x65BA0 // SAMP_REGISTER_CLIENT_CMD_OFFSET
        END
   
        IF 17@ == 3 // 0.3.DL
        THEN
            0A8E: VAR6 = VAR4 + 0x2ACA14 // SAMP_CHAT_INPUT_INFO_OFFSET
            0A8D: VAR6 = read_memory VAR6 size 4 virtual_protect 1
            VAR4 += 0x691B0 // SAMP_REGISTER_CLIENT_CMD_OFFSET
        END
   
        IF 17@ == 4 // 0.3.7 R3
        THEN
            0A8E: VAR6 = VAR4 + 0x26E8CC // SAMP_CHAT_INPUT_INFO_OFFSET
            0A8D: VAR6 = read_memory VAR6 size 4 virtual_protect 1
            VAR4 += 0x69000 // SAMP_REGISTER_CLIENT_CMD_OFFSET
        END
   
        IF 17@ == 5 // 0.3.7 R4
        THEN
            0A8E: VAR6 = VAR4 + 0x26E9FC // SAMP_CHAT_INPUT_INFO_OFFSET
            0A8D: VAR6 = read_memory VAR6 size 4 virtual_protect 1
            VAR4 += 0x69730 // SAMP_REGISTER_CLIENT_CMD_OFFSET
        END
   
        IF 17@ == 6 // 0.3.7 R4 - v2
        THEN
            0A8E: VAR6 = VAR4 + 0x26E9FC // SAMP_CHAT_INPUT_INFO_OFFSET
            0A8D: VAR6 = read_memory VAR6 size 4 virtual_protect 1
            VAR4 += 0x69770 // SAMP_REGISTER_CLIENT_CMD_OFFSET
        END

        IF 17@ == 7 // 0.3.7 R5
        THEN
            0A8E: VAR6 = VAR4 + 0x26EB84 // SAMP_CHAT_INPUT_INFO_OFFSET
            0A8D: VAR6 = read_memory VAR6 size 4 virtual_protect 1
            VAR4 += 0x69770 // SAMP_REGISTER_CLIENT_CMD_OFFSET
        END
 
        0AA6: call_method VAR4 struct VAR6 num_params 2 pop 0 VAR5 VAR1
    END
0AA3: freelib 31@
END
0AB2: ret 0
PHP:
:is_chat_opened
{
    Set TRUE if you wanna check when chat is opened
    Set FALSE if you wanna check when chat is closed
    Usage:
    IF 0AB1: @is_chat_opened 1 CheckingState FALSE // State: TRUE = opened ; FALSE = closed
}
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
            0A8E: 29@ = 30@ + 0x14E0 // SAMP_CHAT_OPENED_OFFSET
            0A8D: 29@ = readMem 29@ sz 4 vp 0
        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
            0A8E: 29@ = 30@ + 0x14E0 // SAMP_CHAT_OPENED_OFFSET
            0A8D: 29@ = readMem 29@ sz 4 vp 0
        END
   
        IF 17@ == 3 // 0.3.DL
        THEN
            0A8E: 30@ = 31@ + 0x2ACA14 // SAMP_CHAT_INPUT_OFFSET
            0A8D: 30@ = readMem 30@ sz 4 vp 0
            0A8E: 29@ = 30@ + 0x14E0 // SAMP_CHAT_OPENED_OFFSET
            0A8D: 29@ = readMem 29@ sz 4 vp 0
        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
            0A8E: 29@ = 30@ + 0x14E0 // SAMP_CHAT_OPENED_OFFSET
            0A8D: 29@ = readMem 29@ sz 4 vp 0
        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
            0A8E: 29@ = 30@ + 0x14E0 // SAMP_CHAT_OPENED_OFFSET
            0A8D: 29@ = readMem 29@ sz 4 vp 0
        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
            0A8E: 29@ = 30@ + 0x14E0 // SAMP_CHAT_OPENED_OFFSET
            0A8D: 29@ = readMem 29@ sz 4 vp 0
        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
            0A8E: 29@ = 30@ + 0x14E0 // SAMP_CHAT_OPENED_OFFSET
            0A8D: 29@ = readMem 29@ sz 4 vp 0
        END
        IF 0@ == TRUE
        THEN
            IF 29@ == TRUE
            THEN 0485:  return_true
            ELSE 059A:  return_false
            END
        ELSE
            IF 29@ == FALSE
            THEN 0485:  return_true
            ELSE 059A:  return_false
            END
        END
    END
0AA3: freelib 31@
END
0AB2: ret 0
PHP:
:is_dialog_active
{
    Set TRUE if you wanna check when dialog is active
    Set FALSE if you wanna check when dialog is closed
    Usage:
    IF 0AB1: @is_dialog_active 1 CheckingState FALSE // State: TRUE = active ; FALSE = closed
}
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@ + 0x21A0B8 // SAMP_DIALOG_INFO_OFFSET
            0A8D: 30@ = readMem 30@ sz 4 vp 0
            0A8E: 29@ = 30@ + 0x28 // SAMP_DIALOG_ACTIVE_OFFSET
            0A8D: 29@ = readMem 29@ sz 4 vp 0
        END
        IF 17@ == 2 // 0.3.7 R2
        THEN
            0A8E: 30@ = 31@ + 0x21A0C0 // SAMP_DIALOG_INFO_OFFSET
            0A8D: 30@ = readMem 30@ sz 4 vp 0
            0A8E: 29@ = 30@ + 0x28 // SAMP_DIALOG_ACTIVE_OFFSET
            0A8D: 29@ = readMem 29@ sz 4 vp 0
        END
   
        IF 17@ == 3 // 0.3.DL
        THEN
            0A8E: 30@ = 31@ + 0x2AC9E0 // SAMP_DIALOG_INFO_OFFSET
            0A8D: 30@ = readMem 30@ sz 4 vp 0
            0A8E: 29@ = 30@ + 0x28 // SAMP_DIALOG_ACTIVE_OFFSET
            0A8D: 29@ = readMem 29@ sz 4 vp 0
        END
   
        IF 17@ == 4 // 0.3.7 R3
        THEN
            0A8E: 30@ = 31@ + 0x26E898 // SAMP_DIALOG_INFO_OFFSET
            0A8D: 30@ = readMem 30@ sz 4 vp 0
            0A8E: 29@ = 30@ + 0x28 // SAMP_DIALOG_ACTIVE_OFFSET
            0A8D: 29@ = readMem 29@ sz 4 vp 0
        END
   
        IF 17@ == 5 // 0.3.7 R4
        THEN
            0A8E: 30@ = 31@ + 0x26E9C8 // SAMP_DIALOG_INFO_OFFSET
            0A8D: 30@ = readMem 30@ sz 4 vp 0
            0A8E: 29@ = 30@ + 0x28 // SAMP_DIALOG_ACTIVE_OFFSET
            0A8D: 29@ = readMem 29@ sz 4 vp 0
        END
   
        IF 17@ == 6 // 0.3.7 R4 - v2
        THEN
            0A8E: 30@ = 31@ + 0x26E9C8 // SAMP_DIALOG_INFO_OFFSET
            0A8D: 30@ = readMem 30@ sz 4 vp 0
            0A8E: 29@ = 30@ + 0x28 // SAMP_DIALOG_ACTIVE_OFFSET
            0A8D: 29@ = readMem 29@ sz 4 vp 0
        END

        IF 17@ == 7 // 0.3.7 R5
        THEN
            0A8E: 30@ = 31@ + 0x26EB50 // SAMP_DIALOG_INFO_OFFSET
            0A8D: 30@ = readMem 30@ sz 4 vp 0
            0A8E: 29@ = 30@ + 0x28 // SAMP_DIALOG_ACTIVE_OFFSET
            0A8D: 29@ = readMem 29@ sz 4 vp 0
        END
        IF 0@ == TRUE
        THEN
            IF 29@ == TRUE
            THEN 0485:  return_true
            ELSE 059A:  return_false
            END
        ELSE
            IF 29@ == FALSE
            THEN 0485:  return_true
            ELSE 059A:  return_false
            END
        END
    END
0AA3: freelib 31@
END
0AB2: ret 0

PHP:
:CreateMarker
{
    0.3.7 - R1
    0AB1: @CreateMarker 7 ID 2 XYZ 1@ 2@ 3@ Icon 23 Color 0xFF0000FF Style 1
}
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@ + 0x21A0F8 // SAMP_INFO_OFFSET
            0A8D: 30@ = readMem 30@ sz 4 vp 0
    
            0A8E: 29@ = 31@ + 0x9E20 // SAMP_CREATE_MARKER_OFFSET
        END
        IF 27@ == 2 // 0.3.7 R2
        THEN
            0A8E: 30@ = 31@ + 0x21A100 // SAMP_INFO_OFFSET
            0A8D: 30@ = readMem 30@ sz 4 vp 0
    
            0A8E: 29@ = 31@ + 0x9E10 // SAMP_CREATE_MARKER_OFFSET
        END
   
        IF 27@ == 3 // 0.3.DL
        THEN
            0A8E: 30@ = 31@ + 0x2ACA24 // SAMP_INFO_OFFSET
            0A8D: 30@ = readMem 30@ sz 4 vp 0
    
            0A8E: 29@ = 31@ + 0x9FF0 // SAMP_CREATE_MARKER_OFFSET
        END
   
        IF 27@ == 4 // 0.3.7 R3
        THEN
            0A8E: 30@ = 31@ + 0x26E8DC // SAMP_INFO_OFFSET
            0A8D: 30@ = readMem 30@ sz 4 vp 0
    
            0A8E: 29@ = 31@ + 0x9F90 // SAMP_CREATE_MARKER_OFFSET
        END
   
        IF 27@ == 5 // 0.3.7 R4
        THEN
            0A8E: 30@ = 31@ + 0x26EA0C // SAMP_INFO_OFFSET
            0A8D: 30@ = readMem 30@ sz 4 vp 0
    
            0A8E: 29@ = 31@ + 0xA2F0 // SAMP_CREATE_MARKER_OFFSET
        END
   
        IF 27@ == 6 // 0.3.7 R4 - v2
        THEN
            0A8E: 30@ = 31@ + 0x26EA0C // SAMP_INFO_OFFSET
            0A8D: 30@ = readMem 30@ sz 4 vp 0
    
            0A8E: 29@ = 31@ + 0xA300 // SAMP_CREATE_MARKER_OFFSET
        END

        IF 27@ == 7 // 0.3.7 R5
        THEN
            0A8E: 30@ = 31@ + 0x26EB94 // SAMP_INFO_OFFSET
            0A8D: 30@ = readMem 30@ sz 4 vp 0
    
            0A8E: 29@ = 31@ + 0xA300 // SAMP_CREATE_MARKER_OFFSET
        END       
 
        0AA8: call_function_method 29@ struct 30@ num_params 7 pop 0 Type 6@ Color 5@ Icon 4@ ZYX 3@ 2@ 1@ Index 0@ _retVal 28@
    END
0AA3: freelib 31@
END
0AB2: 0
PHP:
:DeleteMarker
{
    0.3.7 - R1
    0AB1: @DeleteMarker 1 ID 2
}
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@ + 0x21A0F8 // SAMP_INFO_OFFSET
            0A8D: 30@ = readMem 30@ sz 4 vp 0
    
            0A8E: 29@ = 31@ + 0x8AB0 // SAMP_DELETE_MARKER_OFFSET
        END
        IF 27@ == 2 // 0.3.7 R2
        THEN
            0A8E: 30@ = 31@ + 0x21A100 // SAMP_INFO_OFFSET
            0A8D: 30@ = readMem 30@ sz 4 vp 0
    
            0A8E: 29@ = 31@ + 0x8AC0 // SAMP_DELETE_MARKER_OFFSET
        END
   
        IF 27@ == 3 // 0.3.DL
        THEN
            0A8E: 30@ = 31@ + 0x2ACA24 // SAMP_INFO_OFFSET
            0A8D: 30@ = readMem 30@ sz 4 vp 0
    
            0A8E: 29@ = 31@ + 0x8CA0 // SAMP_DELETE_MARKER_OFFSET
        END
   
        IF 27@ == 4 // 0.3.7 R3
        THEN
            0A8E: 30@ = 31@ + 0x26E8DC // SAMP_INFO_OFFSET
            0A8D: 30@ = readMem 30@ sz 4 vp 0
    
            0A8E: 29@ = 31@ + 0x8C40 // SAMP_DELETE_MARKER_OFFSET
        END
   
        IF 27@ == 5 // 0.3.7 R4
        THEN
            0A8E: 30@ = 31@ + 0x26EA0C // SAMP_INFO_OFFSET
            0A8D: 30@ = readMem 30@ sz 4 vp 0
    
            0A8E: 29@ = 31@ + 0x8FA0 // SAMP_DELETE_MARKER_OFFSET
        END
   
        IF 27@ == 6 // 0.3.7 R4 - v2
        THEN
            0A8E: 30@ = 31@ + 0x26EA0C // SAMP_INFO_OFFSET
            0A8D: 30@ = readMem 30@ sz 4 vp 0
    
            0A8E: 29@ = 31@ + 0x8FB0 // SAMP_DELETE_MARKER_OFFSET
        END

        IF 27@ == 7 // 0.3.7 R5
        THEN
            0A8E: 30@ = 31@ + 0x26EB94 // SAMP_INFO_OFFSET
            0A8D: 30@ = readMem 30@ sz 4 vp 0
    
            0A8E: 29@ = 31@ + 0x8FB0 // SAMP_DELETE_MARKER_OFFSET
        END
        0AA8: call_function_method 29@ struct 30@ num_params 1 pop 0 Index 0@ _retVal 28@
    END
0AA3: freelib 31@
END
0AB2: 0
PHP:
:get_dialog_caption
{
    0AB1: @get_dialog_caption 0 _Returned: Caption 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@ + 0x21A0B8 // SAMP_DIALOG_INFO_OFFSET
            0A8D: 30@ = readMem 30@ sz 4 vp 0
            0A8E: 29@ = 30@ + 0x28 // SAMP_DIALOG_ACTIVE_OFFSET
            0A8D: 29@ = readMem 29@ sz 4 vp 0
        END
        IF 17@ == 2 // 0.3.7 R2
        THEN
            0A8E: 30@ = 31@ + 0x21A0C0 // SAMP_DIALOG_INFO_OFFSET
            0A8D: 30@ = readMem 30@ sz 4 vp 0
            0A8E: 29@ = 30@ + 0x28 // SAMP_DIALOG_ACTIVE_OFFSET
            0A8D: 29@ = readMem 29@ sz 4 vp 0
        END
    
        IF 17@ == 3 // 0.3.DL
        THEN
            0A8E: 30@ = 31@ + 0x2AC9E0 // SAMP_DIALOG_INFO_OFFSET
            0A8D: 30@ = readMem 30@ sz 4 vp 0
            0A8E: 29@ = 30@ + 0x28 // SAMP_DIALOG_ACTIVE_OFFSET
            0A8D: 29@ = readMem 29@ sz 4 vp 0
        END
    
        IF 17@ == 4 // 0.3.7 R3
        THEN
            0A8E: 30@ = 31@ + 0x26E898 // SAMP_DIALOG_INFO_OFFSET
            0A8D: 30@ = readMem 30@ sz 4 vp 0
            0A8E: 29@ = 30@ + 0x28 // SAMP_DIALOG_ACTIVE_OFFSET
            0A8D: 29@ = readMem 29@ sz 4 vp 0
        END
    
        IF 17@ == 5 // 0.3.7 R4
        THEN
            0A8E: 30@ = 31@ + 0x26E9C8 // SAMP_DIALOG_INFO_OFFSET
            0A8D: 30@ = readMem 30@ sz 4 vp 0
            0A8E: 29@ = 30@ + 0x28 // SAMP_DIALOG_ACTIVE_OFFSET
            0A8D: 29@ = readMem 29@ sz 4 vp 0
        END
    
        IF 17@ == 6 // 0.3.7 R4 - v2
        THEN
            0A8E: 30@ = 31@ + 0x26E9C8 // SAMP_DIALOG_INFO_OFFSET
            0A8D: 30@ = readMem 30@ sz 4 vp 0
            0A8E: 29@ = 30@ + 0x28 // SAMP_DIALOG_ACTIVE_OFFSET
            0A8D: 29@ = readMem 29@ sz 4 vp 0
        END

        IF 17@ == 7 // 0.3.7 R5
        THEN
            0A8E: 30@ = 31@ + 0x26EB50 // SAMP_DIALOG_INFO_OFFSET
            0A8D: 30@ = readMem 30@ sz 4 vp 0
            0A8E: 29@ = 30@ + 0x28 // SAMP_DIALOG_ACTIVE_OFFSET
            0A8D: 29@ = readMem 29@ sz 4 vp 0
        END
        IF 29@ == TRUE
        THEN
            0A8E: 28@ = 30@ + 0x40 // SAMP_DIALOG_CAPTION_OFFSET
            0485: dialog_open
            0AB2: ret 1 28@
        ELSE 059A:  dialog closed
        END
    END
0AA3: freelib 31@
END
0AB2: ret 0
PHP:
:process_chat_input
/*
    0AC8: 1@ = allocate_memory_size 144
    0AD3: 1@ = format "text or /command"
    0AB1: @process_chat_input 1 InputText 1@
    0AC9: free_allocated_memory 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     // pChatInput;
            0A8E: 28@ = 29@ + 0x8                // pChatInput->pEditBox;
            0A8D: 27@ = readMem 28@ sz 4 vp 0     // pEditBox;
      
            0A8E: 26@ = 31@ + 0x80F60 // CDXUTEditBox::SetText
            0A8E: 25@ = 31@ + 0x65D30 // PROCESS_INPUT
        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     // pChatInput;
            0A8E: 28@ = 29@ + 0x8                // pChatInput->pEditBox;
            0A8D: 27@ = readMem 28@ sz 4 vp 0     // pEditBox;
      
            0A8E: 26@ = 31@ + 0x81000 // CDXUTEditBox::SetText
            0A8E: 25@ = 31@ + 0x65E00 // PROCESS_INPUT
        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     // pChatInput;
            0A8E: 28@ = 29@ + 0x8                // pChatInput->pEditBox;
            0A8D: 27@ = readMem 28@ sz 4 vp 0     // pEditBox;
      
            0A8E: 26@ = 31@ + 0x85000 // CDXUTEditBox::SetText
            0A8E: 25@ = 31@ + 0x69410 // PROCESS_INPUT
        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     // pChatInput;
            0A8E: 28@ = 29@ + 0x8                // pChatInput->pEditBox;
            0A8D: 27@ = readMem 28@ sz 4 vp 0     // pEditBox;
      
            0A8E: 26@ = 31@ + 0x84E70 // CDXUTEditBox::SetText
            0A8E: 25@ = 31@ + 0x69260 // PROCESS_INPUT
        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     // pChatInput;
            0A8E: 28@ = 29@ + 0x8                // pChatInput->pEditBox;
            0A8D: 27@ = readMem 28@ sz 4 vp 0     // pEditBox;
      
            0A8E: 26@ = 31@ + 0x855B0 // CDXUTEditBox::SetText
            0A8E: 25@ = 31@ + 0x69990 // PROCESS_INPUT
        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     // pChatInput;
            0A8E: 28@ = 29@ + 0x8                // pChatInput->pEditBox;
            0A8D: 27@ = readMem 28@ sz 4 vp 0     // pEditBox;
      
            0A8E: 26@ = 31@ + 0x855E0 // CDXUTEditBox::SetText
            0A8E: 25@ = 31@ + 0x699D0 // PROCESS_INPUT
        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     // pChatInput;
            0A8E: 28@ = 29@ + 0x8                // pChatInput->pEditBox;
            0A8D: 27@ = readMem 28@ sz 4 vp 0     // pEditBox;
      
            0A8E: 26@ = 31@ + 0x85580 // CDXUTEditBox::SetText
            0A8E: 25@ = 31@ + 0x699D0 // PROCESS_INPUT
        END
 
        0AA8: call_function_method 26@ struct 27@ num_params 2 pop 0 _bSelected 0 _pszText 0@ _retVal 6@
        0AA8: call_function_method 25@ struct 29@ num_params 0 pop 0 _retVal 7@
    END
0AA3: freelib 31@
END
0AB2: 0
PHP:
:set_current_dialog_list_item
{
    0AB1: @set_current_dialog_list_item 2 SampVersionID 0@ Item 1
}
IF 0AA2: 2@ = "samp.dll"
THEN
    IF 0@ > 0
    THEN
        IF 0@ == 1 // 0.3.7 R1
        THEN
            0A8E: 3@ = 2@ + 0x21A0B8 // SAMP_DIALOG_INFO_OFFSET  
            0A8D: 3@ = readMem 3@ sz 4 vp 0
            0A8E: 4@ = 3@ + 0x20 // SAMP_DIALOG_LIST_BOX_OFFSET         
            0A8D: 4@ = readMem 4@ sz 4 vp 0
 
            0A8E: 5@ = 2@ + 0x863C0 // SAMP_SET_DIALOG_LIST_ITEM_OFFSET
        END
        IF 0@ == 2 // 0.3.7 R2
        THEN
            0A8E: 3@ = 2@ + 0x21A0C0 // SAMP_DIALOG_INFO_OFFSET  
            0A8D: 3@ = readMem 3@ sz 4 vp 0
            0A8E: 4@ = 3@ + 0x20 // SAMP_DIALOG_LIST_BOX_OFFSET         
            0A8D: 4@ = readMem 4@ sz 4 vp 0
 
            0A8E: 5@ = 2@ + 0x86460 // SAMP_SET_DIALOG_LIST_ITEM_OFFSET
        END
   
        IF 0@ == 3 // 0.3.DL
        THEN
            0A8E: 3@ = 2@ + 0x2AC9E0 // SAMP_DIALOG_INFO_OFFSET  
            0A8D: 3@ = readMem 3@ sz 4 vp 0
            0A8E: 4@ = 3@ + 0x20 // SAMP_DIALOG_LIST_BOX_OFFSET         
            0A8D: 4@ = readMem 4@ sz 4 vp 0
 
            0A8E: 5@ = 2@ + 0x8A470 // SAMP_SET_DIALOG_LIST_ITEM_OFFSET
        END
   
        IF 0@ == 4 // 0.3.7 R3
        THEN
            0A8E: 3@ = 2@ + 0x26E898 // SAMP_DIALOG_INFO_OFFSET  
            0A8D: 3@ = readMem 3@ sz 4 vp 0
            0A8E: 4@ = 3@ + 0x20 // SAMP_DIALOG_LIST_BOX_OFFSET         
            0A8D: 4@ = readMem 4@ sz 4 vp 0
 
            0A8E: 5@ = 2@ + 0x8A2E0 // SAMP_SET_DIALOG_LIST_ITEM_OFFSET
        END
   
        IF 0@ == 5 // 0.3.7 R4
        THEN
            0A8E: 3@ = 2@ + 0x26E9C8 // SAMP_DIALOG_INFO_OFFSET  
            0A8D: 3@ = readMem 3@ sz 4 vp 0
            0A8E: 4@ = 3@ + 0x20 // SAMP_DIALOG_LIST_BOX_OFFSET         
            0A8D: 4@ = readMem 4@ sz 4 vp 0
 
            0A8E: 5@ = 2@ + 0x8AA20 // SAMP_SET_DIALOG_LIST_ITEM_OFFSET
        END
   
        IF 0@ == 6 // 0.3.7 R4 - v2
        THEN
            0A8E: 3@ = 2@ + 0x26E9C8 // SAMP_DIALOG_INFO_OFFSET  
            0A8D: 3@ = readMem 3@ sz 4 vp 0
            0A8E: 4@ = 3@ + 0x20 // SAMP_DIALOG_LIST_BOX_OFFSET         
            0A8D: 4@ = readMem 4@ sz 4 vp 0
 
            0A8E: 5@ = 2@ + 0x8AA50 // SAMP_SET_DIALOG_LIST_ITEM_OFFSET
        END

        IF 0@ == 7 // 0.3.7 R5
        THEN
            0A8E: 3@ = 2@ + 0x26EB50 // SAMP_DIALOG_INFO_OFFSET  
            0A8D: 3@ = readMem 3@ sz 4 vp 0
            0A8E: 4@ = 3@ + 0x20 // SAMP_DIALOG_LIST_BOX_OFFSET         
            0A8D: 4@ = readMem 4@ sz 4 vp 0
 
            0A8E: 5@ = 2@ + 0x8A9F0 // SAMP_SET_DIALOG_LIST_ITEM_OFFSET
        END
 
        0AA8: call_function_method 5@ struct 4@ num_params 1 pop 0 Item 1@ _Return: 31@
    END
0AA3: freelib 31@
END
0AB2: 0
PHP:
:CloseCurrentDialogWithButton
{
    0AB1: @CloseCurrentDialogWithButton 1 Button 1 // 1 = Left , 0 = Right
}
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@ + 0x21A0B8 // SAMP_DIALOG_INFO_OFFSET
            0A8D: 29@ = readMem 30@ sz 4 vp 0
            0A8E: 28@ = 31@ + 0x6C040 //SAMP_DIALOG_CLOSE
        END
    
        IF 17@ == 2 // 0.3.7 R2
        THEN
            0A8E: 30@ = 31@ + 0x21A0C0 // SAMP_DIALOG_INFO_OFFSET
            0A8D: 29@ = readMem 30@ sz 4 vp 0
            0A8E: 28@ = 31@ + 0x6C0F0 //SAMP_DIALOG_CLOSE
        END
    
        IF 17@ == 3 // 0.3.DL
        THEN
            0A8E: 30@ = 31@ + 0x2AC9E0 // SAMP_DIALOG_INFO_OFFSET
            0A8D: 29@ = readMem 30@ sz 4 vp 0
            0A8E: 28@ = 31@ + 0x700D0 //SAMP_DIALOG_CLOSE
        END
    
        IF 17@ == 4 // 0.3.7 R3
        THEN
            0A8E: 30@ = 31@ + 0x26E898 // SAMP_DIALOG_INFO_OFFSET
            0A8D: 29@ = readMem 30@ sz 4 vp 0
            0A8E: 28@ = 31@ + 0x6FF40 //SAMP_DIALOG_CLOSE
        END
    
        IF 17@ == 5 // 0.3.7 R4
        THEN
            0A8E: 30@ = 31@ + 0x26E9C8 // SAMP_DIALOG_INFO_OFFSET
            0A8D: 29@ = readMem 30@ sz 4 vp 0
            0A8E: 28@ = 31@ + 0x70660 //SAMP_DIALOG_CLOSE
        END
    
        IF 17@ == 6 // 0.3.7 R4 - v2
        THEN
            0A8E: 30@ = 31@ + 0x26E9C8 // SAMP_DIALOG_INFO_OFFSET
            0A8D: 29@ = readMem 30@ sz 4 vp 0
            0A8E: 28@ = 31@ + 0x70690 //SAMP_DIALOG_CLOSE
        END
    
        IF 17@ == 7 // 0.3.7 R5
        THEN
            0A8E: 30@ = 31@ + 0x26EB50 // SAMP_DIALOG_INFO_OFFSET
            0A8D: 29@ = readMem 30@ sz 4 vp 0
            0A8E: 28@ = 31@ + 0x70630 //SAMP_DIALOG_CLOSE
        END
    
        0AA8: call_function_method 28@ struct 29@ num_params 1 pop 0 Button 0@ _retVal 27@
    END
0AA3: freelib 31@
END
0AB2: 0
 
Last edited:

dphome

Well-known member
Joined
Mar 21, 2020
Messages
460
Solutions
9
Reaction score
166
Location
Poland
PHP:
:Chatmsg
/*
     0AC8: 0@ = allocate_memory_size 1024
     0AD3: 0@ = format "{FFFFFF}Auto Accept: {00FF00}ON"
     0AB1: @Chatmsg 3 SampVersionID 1 text 0@ color -1
*/
IF 0AA2: 31@ = "samp.dll"
THEN
    IF NOT 0@ < 1
    THEN
        IF 0@ == 1 // 0.3.7 R1
        THEN
            0A8E: 30@ = 31@ + 0x21A0E4            // SAMP_CHAT_INFO_OFFSET (R1)
            0A8D: 30@ = readMem 30@ sz 4 vp 0     // pChat;
            0A8E: 29@ = 31@ + 0x64010             // FUNC_ADDTOCHATWND (R1)
        END

        IF 0@ == 2 // 0.3.7 R2
        THEN
            0A8E: 30@ = 31@ + 0x21A0EC            // SAMP_CHAT_INFO_OFFSET (R2)
            0A8D: 30@ = readMem 30@ sz 4 vp 0     // pChat;
            0A8E: 29@ = 31@ + 0x640E0            // FUNC_ADDTOCHATWND (R2)
        END

        IF 0@ == 3 // 0.3.DL
        THEN
            0A8E: 30@ = 31@ + 0x2ACA10            // SAMP_CHAT_INFO_OFFSET (DL)
            0A8D: 30@ = readMem 30@ sz 4 vp 0     // pChat;
            0A8E: 29@ = 31@ + 0x67650             // FUNC_ADDTOCHATWND (DL)
        END

        IF 0@ == 4 // 0.3.7 R3
        THEN
            0A8E: 30@ = 31@ + 0x26E8C8            // SAMP_CHAT_INFO_OFFSET (R3)
            0A8D: 30@ = readMem 30@ sz 4 vp 0     // pChat;
            0A8E: 29@ = 31@ + 0x67460             // FUNC_ADDTOCHATWND (R3)
        END

        IF 0@ == 5 // 0.3.7 R4
        THEN
            0A8E: 30@ = 31@ + 0x26E9F8            // SAMP_CHAT_INFO_OFFSET (R4)
            0A8D: 30@ = readMem 30@ sz 4 vp 0     // pChat;
            0A8E: 29@ = 31@ + 0x67BA0             // FUNC_ADDTOCHATWND (R4) 699D0
        END
      
        IF 0@ == 6 // 0.3.7 R4 - v2
        THEN
            0A8E: 30@ = 31@ + 0x26E9F8            // SAMP_CHAT_INFO_OFFSET (R4)
            0A8D: 30@ = readMem 30@ sz 4 vp 0     // pChat;
            0A8E: 29@ = 31@ + 0x67BE0            // FUNC_ADDTOCHATWND (R4)
        END
        
        IF 0@ == 7 // 0.3.7 R5
        THEN
            0A8E: 30@ = 31@ + 0x26EB80            // SAMP_CHAT_INFO_OFFSET (R4)
            0A8D: 30@ = readMem 30@ sz 4 vp 0     // pChat;
            0A8E: 29@ = 31@ + 0x67BE0            // FUNC_ADDTOCHATWND (R4)
        END
                
        IF 2@ == -1
        THEN 2@ = 0xFFFFFFFF
        END
        0AA6: call 29@ struct 30@ num_params 5 pop 0 params 0 2@ 0 1@ 8
    END
END
0AB2: 0
 

dphome

Well-known member
Joined
Mar 21, 2020
Messages
460
Solutions
9
Reaction score
166
Location
Poland
PHP:
:DisableTakingScreenShotWithF8
{
    0AB1: @DisableTakingScreenShotWithF8 2 SampVersionID 1 State TRUE
}
IF 0AA2: 2@ = "samp.dll"
THEN
    IF NOT 0@ < 0
    THEN
        IF 0@ == 1 // 0.3.7 R1
        THEN 2@ += 0x5D8C1 
        END
        
        IF 0@ == 2 // 0.3.7 R2
        THEN 2@ += 0x5D991
        END
   
        IF 0@ == 3 // 0.3.DL
        THEN 2@ += 0x60E51 
        END
   
        IF 0@ == 4 // 0.3.7 R3
        THEN 2@ += 0x60C61
        END
   
        IF 0@ == 5 // 0.3.7 R4
        THEN 2@ += 0x61391 
        END
        
        IF 0@ == 6 // 0.3.7 R4 - v2
        THEN 2@ += 0x61391 // IDK
        END
        
        IF 0@ == 7 // 0.3.7 R5
        THEN 2@ += 0x613D1
        END
        
        IF 1@ == TRUE
        THEN 0A8C: write_memory 2@ size 1 value 0 virtual_protect 1
        ELSE 0A8C: write_memory 2@ size 1 value 1 virtual_protect 1
        END                        
    END
END
0AB2: 0

PHP:
:TakeScreenShot 
{
    0AB1: @TakeScreenShot 1 SampVersionID 1
}
IF 0AA2: 2@ = "samp.dll"
THEN
    IF NOT 0@ < 0
    THEN
        IF 0@ == 1 // 0.3.7 R1
        THEN 2@ += 0x119CBC 
        END
        
        IF 0@ == 2 // 0.3.7 R2
        THEN 2@ += 0x119CBC
        END
   
        IF 0@ == 3 // 0.3.DL
        THEN 2@ += 0x16BE7C 
        END
   
        IF 0@ == 4 // 0.3.7 R3
        THEN 2@ += 0x12DD3C
        END
   
        IF 0@ == 5 // 0.3.7 R4
        THEN 2@ += 0x12DE64 
        END
        
        IF 0@ == 6 // 0.3.7 R4 - v2
        THEN 2@ += 0x12DE64 // IDK
        END
        
        IF 0@ == 7 // 0.3.7 R5
        THEN 2@ += 0x12DE64
        END
        
        0A8C: write_memory 2@ size 4 value 1 virtual_protect 0                        
    END
END
0AB2: 0

PHP:
:SEND_CMD
{
    0AC8: 0@ = allocate_memory_size 1024
    0AD3: 0@ = format "/cmd"
    0AB1: @SEND_CMD 2 SampVersionID 1 Text 0@
}
IF 0AA2: 2@ = "samp.dll"
THEN
    IF NOT 0@ < 0
    THEN
        IF 0@ == 1 // 0.3.7 R1
        THEN     
            0A8E: 3@ = 2@ + 0x65C60
            0AA5: call 3@ num_param 1 pop 0 1@
        END
        
        IF 0@ == 2 // 0.3.7 R2
        THEN     
            0A8E: 3@ = 2@ + 0x65D30
            0AA5: call 3@ num_param 1 pop 0 1@
        END
   
        IF 0@ == 3 // 0.3.DL
        THEN     
            0A8E: 3@ = 2@ + 0x69340
            0AA5: call 3@ num_param 1 pop 0 1@
        END
   
        IF 0@ == 4 // 0.3.7 R3
        THEN      
            0A8E: 3@ = 2@ + 0x69190
            0AA5: call 3@ num_param 1 pop 0 1@
        END
   
        IF 0@ == 5 // 0.3.7 R4
        THEN     
            0A8E: 3@ = 2@ + 0x698C0
            0AA5: call 3@ num_param 1 pop 0 1@
        END
        
        IF 0@ == 6 // 0.3.7 R4 - v2
        THEN     
            0A8E: 3@ = 2@ + 0x69900
            0AA5: call 3@ num_param 1 pop 0 1@
        END
        
        IF 0@ == 7 // 0.3.7 R5
        THEN     
            0A8E: 3@ = 2@ + 0x69900
            0AA5: call 3@ num_param 1 pop 0 1@
        END                
    END
END
0AB2: 0
 

Parazitas

God
Staff member
Joined
Jan 2, 2017
Messages
3,315
Solutions
7
Reaction score
935
Location
Lithuania
PHP:
:GetPlayerNameByID
{
    0AB1: @GetPlayerNameByID 1 ID 0@ _Returned: Name 31@
}
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@ += 0x18 // SAMP_PPOOL_PLAYER_OFFSET       
            0A8D: 30@ = readMem 30@ sz 4 vp 0
      
            0A8E: 29@ = 31@ + 0x13CE0 // SAMP_GET_PLAYER_NAME_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@ += 0x8 // SAMP_PPOOL_PLAYER_OFFSET         
            0A8D: 30@ = readMem 30@ sz 4 vp 0
       
            0A8E: 29@ = 31@ + 0x13DA0 // SAMP_GET_PLAYER_NAME_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@ += 0x8 // SAMP_PPOOL_PLAYER_OFFSET       
            0A8D: 30@ = readMem 30@ sz 4 vp 0
      
            0A8E: 29@ = 31@ + 0x170D0 // SAMP_GET_PLAYER_NAME_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@ += 0x8 // SAMP_PPOOL_PLAYER_OFFSET          
            0A8D: 30@ = readMem 30@ sz 4 vp 0
        
            0A8E: 29@ = 31@ + 0x16F00 // SAMP_GET_PLAYER_NAME_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@ += 0x8 // SAMP_PPOOL_PLAYER_OFFSET        
            0A8D: 30@ = readMem 30@ sz 4 vp 0
      
            0A8E: 29@ = 31@ + 0x17570 // SAMP_GET_PLAYER_NAME_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@ += 0x4 // SAMP_PPOOL_PLAYER_OFFSET        
            0A8D: 30@ = readMem 30@ sz 4 vp 0
      
            0A8E: 29@ = 31@ + 0x175C0 // SAMP_GET_PLAYER_NAME_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@ += 0x4 // SAMP_PPOOL_PLAYER_OFFSET        
            0A8D: 30@ = readMem 30@ sz 4 vp 0
      
            0A8E: 29@ = 31@ + 0x175C0 // SAMP_GET_PLAYER_NAME_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
0AA3: freelib 31@
END
0AB2: ret 1 28@
 
Last edited:

Parazitas

God
Staff member
Joined
Jan 2, 2017
Messages
3,315
Solutions
7
Reaction score
935
Location
Lithuania
PHP:
:IsPlayerConnected
{
    IF 0AB1: @IsPlayerConnected 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@ += 0x18 // SAMP_PPOOL_PLAYER_OFFSET        
            0A8D: 30@ = readMem 30@ sz 4 vp 0
       
            0A8E: 29@ = 31@ + 0x10B0 // SAMP_IS_PLAYER_CONNECTED_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@ += 0x8 // SAMP_PPOOL_PLAYER_OFFSET          
            0A8D: 30@ = readMem 30@ sz 4 vp 0
        
            0A8E: 29@ = 31@ + 0x10B0 // SAMP_IS_PLAYER_CONNECTED_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@ += 0x8 // SAMP_PPOOL_PLAYER_OFFSET        
            0A8D: 30@ = readMem 30@ sz 4 vp 0
       
            0A8E: 29@ = 31@ + 0x10B0 // SAMP_IS_PLAYER_CONNECTED_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@ += 0x8 // SAMP_PPOOL_PLAYER_OFFSET           
            0A8D: 30@ = readMem 30@ sz 4 vp 0
         
            0A8E: 29@ = 31@ + 0x10B0 // SAMP_IS_PLAYER_CONNECTED_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@ += 0x8 // SAMP_PPOOL_PLAYER_OFFSET         
            0A8D: 30@ = readMem 30@ sz 4 vp 0
       
            0A8E: 29@ = 31@ + 0x10B0 // SAMP_IS_PLAYER_CONNECTED_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@ += 0x4 // SAMP_PPOOL_PLAYER_OFFSET         
            0A8D: 30@ = readMem 30@ sz 4 vp 0
       
            0A8E: 29@ = 31@ + 0x10B0 // SAMP_IS_PLAYER_CONNECTED_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@ += 0x4 // SAMP_PPOOL_PLAYER_OFFSET         
            0A8D: 30@ = readMem 30@ sz 4 vp 0
       
            0A8E: 29@ = 31@ + 0x10B0 // SAMP_IS_PLAYER_CONNECTED_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
0AA3: freelib 31@
END
0AB2: ret 0
 
Last edited:

Parazitas

God
Staff member
Joined
Jan 2, 2017
Messages
3,315
Solutions
7
Reaction score
935
Location
Lithuania
PHP:
:UpdateScoreBoard
{
    0AB1: @UpdateScoreBoard 0
    UpdateScoreBoard - snippet used to update player score and ping from ScoreBoard every 2.5sec when using snippets:
    GetPlayerScoreByID, GetPlayerPingByID
}
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
       
            0A8E: 29@ = 31@ + 0x8A10 // SAMP_UPDATE_SCOREBOARD_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
        
            0A8E: 29@ = 31@ + 0x8A20 // SAMP_UPDATE_SCOREBOARD_OFFSET
        END
       
        IF 17@ == 3 // 0.3.DL
        THEN
            0A8E: 30@ = 31@ + 0x2ACA24 // SAMP_INFO_OFFSET 
            0A8D: 30@ = readMem 30@ sz 4 vp 0
       
            0A8E: 29@ = 31@ + 0x8C00 // SAMP_UPDATE_SCOREBOARD_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
         
            0A8E: 29@ = 31@ + 0x8BA0 // SAMP_UPDATE_SCOREBOARD_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
       
            0A8E: 29@ = 31@ + 0x8F00 // SAMP_UPDATE_SCOREBOARD_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
       
            0A8E: 29@ = 31@ + 0x8F10 // SAMP_UPDATE_SCOREBOARD_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
       
            0A8E: 29@ = 31@ + 0x8F10 // SAMP_UPDATE_SCOREBOARD_OFFSET
        END
       
        0AA8: call_function_method 29@ struct 30@ num_params 0 pop 0 _Returned: val 28@
        IF 28@ > 0
        THEN 0485:  RETURN_TRUE
        ELSE 059A:  RETURN_FALSE
        END
       
    END
0AA3: freelib 31@
END
0AB2: 0
 
Last edited:

Parazitas

God
Staff member
Joined
Jan 2, 2017
Messages
3,315
Solutions
7
Reaction score
935
Location
Lithuania
PHP:
:UpdateScoreBoardList
{
    0AB1: @UpdateScoreBoardList 0
    UpdateScoreBoardList - snippet used to update player list from ScoreBoard every 2.5sec when using snippet:
    GetPlayerNameByID
}
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@ + 0x21A0B4 // SAMP_SCOREBOARD_INFO_OFFSET
            0A8D: 30@ = readMem 30@ sz 4 vp 0
      
            0A8E: 29@ = 31@ + 0x6A680 // SAMP_UPDATE_SCOREBOARD_LIST_OFFSET
        END
        IF 17@ == 2 // 0.3.7 R2
        THEN
            0A8E: 30@ = 31@ + 0x21A0BC // SAMP_SCOREBOARD_INFO_OFFSET
            0A8D: 30@ = readMem 30@ sz 4 vp 0
      
            0A8E: 29@ = 31@ + 0x6A730 // SAMP_UPDATE_SCOREBOARD_LIST_OFFSET
        END
      
        IF 17@ == 3 // 0.3.DL
        THEN
            0A8E: 30@ = 31@ + 0x2AC9DC // SAMP_SCOREBOARD_INFO_OFFSET
            0A8D: 30@ = readMem 30@ sz 4 vp 0
      
            0A8E: 29@ = 31@ + 0x6E760 // SAMP_UPDATE_SCOREBOARD_LIST_OFFSET
        END
      
        IF 17@ == 4 // 0.3.7 R3
        THEN
            0A8E: 30@ = 31@ + 0x26E894 // SAMP_SCOREBOARD_INFO_OFFSET
            0A8D: 30@ = readMem 30@ sz 4 vp 0
      
            0A8E: 29@ = 31@ + 0x6E5C0 // SAMP_UPDATE_SCOREBOARD_LIST_OFFSET
        END
      
        IF 17@ == 5 // 0.3.7 R4
        THEN
            0A8E: 30@ = 31@ + 0x26E9C4 // SAMP_SCOREBOARD_INFO_OFFSET
            0A8D: 30@ = readMem 30@ sz 4 vp 0
      
            0A8E: 29@ = 31@ + 0x6ECF0 // SAMP_UPDATE_SCOREBOARD_LIST_OFFSET
        END
      
        IF 17@ == 6 // 0.3.7 R4 - v2
        THEN
            0A8E: 30@ = 31@ + 0x26E9C4 // SAMP_SCOREBOARD_INFO_OFFSET
            0A8D: 30@ = readMem 30@ sz 4 vp 0
      
            0A8E: 29@ = 31@ + 0x6ED30 // SAMP_UPDATE_SCOREBOARD_LIST_OFFSET
        END
      
        IF 17@ == 7 // 0.3.7 R5
        THEN
            0A8E: 30@ = 31@ + 0x26EB4C // SAMP_SCOREBOARD_INFO_OFFSET
            0A8D: 30@ = readMem 30@ sz 4 vp 0
      
            0A8E: 29@ = 31@ + 0x6ED30 // SAMP_UPDATE_SCOREBOARD_LIST_OFFSET
        END
      
        0AA8: call_function_method 29@ struct 30@ num_params 0 pop 0 _Returned: val 28@
        IF 28@ > 0
        THEN 0485:  RETURN_TRUE
        ELSE 059A:  RETURN_FALSE
        END
      
    END
0AA3: freelib 31@
END
0AB2: 0
 
Last edited:

Parazitas

God
Staff member
Joined
Jan 2, 2017
Messages
3,315
Solutions
7
Reaction score
935
Location
Lithuania
PHP:
:GetPlayerScoreByID
{
    0AB1: @GetPlayerScoreByID 1 ID 0@ _Returned: Score 31@
}
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@ += 0x18 // SAMP_PPOOL_PLAYER_OFFSET       
            0A8D: 30@ = readMem 30@ sz 4 vp 0
      
            0A8E: 29@ = 31@ + 0x6A190 // SAMP_GET_PLAYER_SCORE_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@ += 0x8 // SAMP_PPOOL_PLAYER_OFFSET         
            0A8D: 30@ = readMem 30@ sz 4 vp 0
       
            0A8E: 29@ = 31@ + 0x6A260 // SAMP_GET_PLAYER_SCORE_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@ += 0x8 // SAMP_PPOOL_PLAYER_OFFSET       
            0A8D: 30@ = readMem 30@ sz 4 vp 0
      
            0A8E: 29@ = 31@ + 0x6E290 // SAMP_GET_PLAYER_SCORE_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@ += 0x8 // SAMP_PPOOL_PLAYER_OFFSET          
            0A8D: 30@ = readMem 30@ sz 4 vp 0
        
            0A8E: 29@ = 31@ + 0x6E0E0 // SAMP_GET_PLAYER_SCORE_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@ += 0x8 // SAMP_PPOOL_PLAYER_OFFSET        
            0A8D: 30@ = readMem 30@ sz 4 vp 0
      
            0A8E: 29@ = 31@ + 0x6E810 // SAMP_GET_PLAYER_SCORE_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@ += 0x4 // SAMP_PPOOL_PLAYER_OFFSET        
            0A8D: 30@ = readMem 30@ sz 4 vp 0
      
            0A8E: 29@ = 31@ + 0x6E850 // SAMP_GET_PLAYER_SCORE_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@ += 0x4 // SAMP_PPOOL_PLAYER_OFFSET        
            0A8D: 30@ = readMem 30@ sz 4 vp 0
      
            0A8E: 29@ = 31@ + 0x6E850 // SAMP_GET_PLAYER_SCORE_OFFSET
        END
      
        0AA8: call_function_method 29@ struct 30@ num_params 1 pop 0 ID 0@ _Returned: Score 28@
        IF 28@ > 0
        THEN 0485:  RETURN_TRUE
        ELSE 059A:  RETURN_FALSE
        END
      
    END
0AA3: freelib 31@
END
0AB2: ret 1 28@
 
Last edited:

Parazitas

God
Staff member
Joined
Jan 2, 2017
Messages
3,315
Solutions
7
Reaction score
935
Location
Lithuania
Create and control SAMP textdraw
PHP:
:CreateTextdraw
{
    0AC8: 0@ = allocate_memory_size 1024
    0AD3: 0@ = format "Now you see this textdraw!" 
    0AB1: @CreateTextdraw 4 ID 1000 Text 0@ XY 320.0 224.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: 29@ = 31@ + 0x21A0F8 // SAMP_INFO_OFFSET
            0A8D: 29@ readMem 29@ sz 4 vp 0
            29@ += 0x3CD // SAMP_PPOOLS_OFFSET
            0A8D: 29@ readMem 29@ sz 4 vp 0
            29@ += 0x10 // SAMP_PPOOL_TEXTDRAW_OFFSET
            0A8D: 29@ readMem 29@ sz 4 vp 0
        
            0A8E: 28@ = 31@ + 0x1AE20 //SAMP_CREATE_TEXTDRAW_OFFSET
        END
        IF 17@ == 2 // 0.3.7 R2
        THEN
            0A8E: 29@ = 31@ + 0x21A100 // SAMP_INFO_OFFSET
            0A8D: 29@ readMem 29@ sz 4 vp 0
            29@ += 0x3C5 // SAMP_PPOOLS_OFFSET
            0A8D: 29@ readMem 29@ sz 4 vp 0
            29@ += 0x20 // SAMP_PPOOL_TEXTDRAW_OFFSET
            0A8D: 29@ readMem 29@ sz 4 vp 0
        
            0A8E: 28@ = 31@ + 0x1AF00 //SAMP_CREATE_TEXTDRAW_OFFSET
        END
       
        IF 17@ == 3 // 0.3.DL
        THEN
            0A8E: 29@ = 31@ + 0x2ACA24 // SAMP_INFO_OFFSET
            0A8D: 29@ readMem 29@ sz 4 vp 0
            29@ += 0x3DE // SAMP_PPOOLS_OFFSET
            0A8D: 29@ readMem 29@ sz 4 vp 0
            29@ += 0x20 // SAMP_PPOOL_TEXTDRAW_OFFSET
            0A8D: 29@ readMem 29@ sz 4 vp 0
        
            0A8E: 28@ = 31@ + 0x1E3D0 //SAMP_CREATE_TEXTDRAW_OFFSET
        END
       
        IF 17@ == 4 // 0.3.7 R3
        THEN
            0A8E: 29@ = 31@ + 0x26E8DC // SAMP_INFO_OFFSET
            0A8D: 29@ readMem 29@ sz 4 vp 0
            29@ += 0x3DE // SAMP_PPOOLS_OFFSET
            0A8D: 29@ readMem 29@ sz 4 vp 0
            29@ += 0x20 // SAMP_PPOOL_TEXTDRAW_OFFSET
            0A8D: 29@ readMem 29@ sz 4 vp 0
        
            0A8E: 28@ = 31@ + 0x1E1C0 //SAMP_CREATE_TEXTDRAW_OFFSET
        END
       
        IF 17@ == 5 // 0.3.7 R4
        THEN
            0A8E: 29@ = 31@ + 0x26EA0C // SAMP_INFO_OFFSET
            0A8D: 29@ readMem 29@ sz 4 vp 0
            29@ += 0x3DE // SAMP_PPOOLS_OFFSET
            0A8D: 29@ readMem 29@ sz 4 vp 0
            29@ += 0x20 // SAMP_PPOOL_TEXTDRAW_OFFSET
            0A8D: 29@ readMem 29@ sz 4 vp 0
        
            0A8E: 28@ = 31@ + 0x1E8C0 //SAMP_CREATE_TEXTDRAW_OFFSET
        END
       
        IF 17@ == 6 // 0.3.7 R4 - v2
        THEN
            0A8E: 29@ = 31@ + 0x26EA0C // SAMP_INFO_OFFSET
            0A8D: 29@ readMem 29@ sz 4 vp 0
            29@ += 0x3DE // SAMP_PPOOLS_OFFSET
            0A8D: 29@ readMem 29@ sz 4 vp 0
            29@ += 0x1C // SAMP_PPOOL_TEXTDRAW_OFFSET
            0A8D: 29@ readMem 29@ sz 4 vp 0
        
            0A8E: 28@ = 31@ + 0x1E910 //SAMP_CREATE_TEXTDRAW_OFFSET
        END
       
        IF 17@ == 7 // 0.3.7 R5
        THEN
            0A8E: 29@ = 31@ + 0x26EB94 // SAMP_INFO_OFFSET
            0A8D: 29@ readMem 29@ sz 4 vp 0
            29@ += 0x3DE // SAMP_PPOOLS_OFFSET
            0A8D: 29@ readMem 29@ sz 4 vp 0
            29@ += 0x1C // SAMP_PPOOL_TEXTDRAW_OFFSET
            0A8D: 29@ readMem 29@ sz 4 vp 0
                              
            0A8E: 28@ = 31@ + 0x1E910 //SAMP_CREATE_TEXTDRAW_OFFSET
        END
        0AC8: 30@ = allocate_memory_size 66
        0A8C: write_memory 30@ size 2 value 2 virtual_protect 1
        30@ += 0x1
        0A8C: write_memory 30@ size 4 value 0.25 virtual_protect 1 // fLetterWidth
        30@ += 0x4
        0A8C: write_memory 30@ size 4 value 1.0 virtual_protect 1 // fLetterHeight
        30@ += 0x4
        0A8C: write_memory 30@ size 4 value 0xFFFFFFFF virtual_protect 1 // letterColor
        30@ += 0x4
        0A8C: write_memory 30@ size 4 value 0.0 virtual_protect 1 // fBoxWidth
        30@ += 0x4
        0A8C: write_memory 30@ size 4 value 0.0 virtual_protect 1 // fBoxHeight
        30@ += 0x4
        0A8C: write_memory 30@ size 4 value 0xFF000000 virtual_protect 1 // boxColor
        30@ += 0x4
        0A8C: write_memory 30@ size 1 value 0 virtual_protect 1 // nShadow
        30@ += 0x1
        0A8C: write_memory 30@ size 1 value 0 virtual_protect 1 // bOutline
        30@ += 0x1
        0A8C: write_memory 30@ size 4 value 0xFF000000 virtual_protect 1 // m_backgroundColor
        30@ += 0x4
        0A8C: write_memory 30@ size 1 value 1 virtual_protect 1 // m_nStyle
        30@ += 0x1
        0A8C: write_memory 30@ size 1 value 0 virtual_protect 1 // unknown
        30@ += 0x1
        0A8C: write_memory 30@ size 4 value 2@ virtual_protect 1 // m_fX
        30@ += 0x4
        0A8C: write_memory 30@ size 4 value 3@ virtual_protect 1 // m_fY
        30@ += 0x4
        0A8C: write_memory 30@ size 2 value 0 virtual_protect 1 // m_nModel
        30@ += 0x2
        0A8C: write_memory 30@ size 4 value 0.0 virtual_protect 1 // m_rotationX
        30@ += 0x4
        0A8C: write_memory 30@ size 4 value 0.0 virtual_protect 1 // m_rotationY
        30@ += 0x4
        0A8C: write_memory 30@ size 4 value 0.0 virtual_protect 1 // m_rotationZ
        30@ += 0x4
        0A8C: write_memory 30@ size 4 value 0.0 virtual_protect 1 // m_fZoom
        30@ += 0x4
        0A8C: write_memory 30@ size 2 value 0xFF virtual_protect 1 // m_aColor[0]
        30@ += 0x2
        0A8C: write_memory 30@ size 2 value 0xFF virtual_protect 1 // m_aColor[1]
        30@ -= 61 // go back to the original pointer.
        
       0AA6: call_method 28@ struct 29@ num_params 3 pop 0 Text 1@ pTransmit 30@ ID 0@  _retVal 6@
       
    END
0AA3: freelib 31@
END
0AB2: 0
PHP:
:SetTextdrawAlign
{
    0AB1: @SetTextdrawAlign 2 ID 1000 Align 1
    Types:
    1 - left
    2 - center
    3 - right
}
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: 31@ = 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@ += 0x10 // SAMP_PPOOL_TEXTDRAW_OFFSET
            0A8D: 31@ readMem 31@ sz 4 vp 0
            0@ *= 0x4 // TEXTDRAW_ID * 4
            005A: 31@ += 0@
            0A8E: 27@ = 31@ + 0x2400  // SAMP_TEXTDRAW_STRUCT_OFFSET
            0A8D: 27@ readMem 27@ sz 1 vp 0 // READ FIRST BYTE - SECURITY_CHECK
            IF 27@ > 0
            THEN 0A8D: 30@ readMem 31@ sz 4 vp 0 
            ELSE 30@ = 0
            END
        END
        IF 17@ == 2 // 0.3.7 R2
        THEN
            0A8E: 31@ = 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@ += 0x20 // SAMP_PPOOL_TEXTDRAW_OFFSET
            0A8D: 31@ readMem 31@ sz 4 vp 0
            0@ *= 0x4 // TEXTDRAW_ID * 4
            005A: 31@ += 0@
            0A8E: 27@ = 31@ + 0x2400  // SAMP_TEXTDRAW_STRUCT_OFFSET
            0A8D: 27@ readMem 27@ sz 1 vp 0 // READ FIRST BYTE - SECURITY_CHECK
            IF 27@ > 0
            THEN 0A8D: 30@ readMem 31@ sz 4 vp 0 
            ELSE 30@ = 0
            END
        END
       
        IF 17@ == 3 // 0.3.DL
        THEN   
            0A8E: 31@ = 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@ += 0x20 // SAMP_PPOOL_TEXTDRAW_OFFSET
            0A8D: 31@ readMem 31@ sz 4 vp 0
            0@ *= 0x4 // TEXTDRAW_ID * 4
            005A: 31@ += 0@
            0A8E: 27@ = 31@ + 0x2400  // SAMP_TEXTDRAW_STRUCT_OFFSET
            0A8D: 27@ readMem 27@ sz 1 vp 0 // READ FIRST BYTE - SECURITY_CHECK
            IF 27@ > 0
            THEN 0A8D: 30@ readMem 31@ sz 4 vp 0 
            ELSE 30@ = 0
            END
        END
       
        IF 17@ == 4 // 0.3.7 R3
        THEN
            0A8E: 31@ = 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@ += 0x20 // SAMP_PPOOL_TEXTDRAW_OFFSET
            0A8D: 31@ readMem 31@ sz 4 vp 0
            0@ *= 0x4 // TEXTDRAW_ID * 4
            005A: 31@ += 0@
            0A8E: 27@ = 31@ + 0x2400  // SAMP_TEXTDRAW_STRUCT_OFFSET
            0A8D: 27@ readMem 27@ sz 1 vp 0 // READ FIRST BYTE - SECURITY_CHECK
            IF 27@ > 0
            THEN 0A8D: 30@ readMem 31@ sz 4 vp 0 
            ELSE 30@ = 0
            END
        END
       
        IF 17@ == 5 // 0.3.7 R4
        THEN
            0A8E: 31@ = 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@ += 0x20 // SAMP_PPOOL_TEXTDRAW_OFFSET
            0A8D: 31@ readMem 31@ sz 4 vp 0
            0@ *= 0x4 // TEXTDRAW_ID * 4
            005A: 31@ += 0@
            0A8E: 27@ = 31@ + 0x2400  // SAMP_TEXTDRAW_STRUCT_OFFSET
            0A8D: 27@ readMem 27@ sz 1 vp 0 // READ FIRST BYTE - SECURITY_CHECK
            IF 27@ > 0
            THEN 0A8D: 30@ readMem 31@ sz 4 vp 0 
            ELSE 30@ = 0
            END
        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
            31@ += 0x3DE // SAMP_PPOOLS_OFFSET
            0A8D: 31@ readMem 31@ sz 4 vp 0
            31@ += 0x1C // SAMP_PPOOL_TEXTDRAW_OFFSET
            0A8D: 31@ readMem 31@ sz 4 vp 0
            0@ *= 0x4 // TEXTDRAW_ID * 4
            005A: 31@ += 0@
            0A8E: 27@ = 31@ + 0x2400  // SAMP_TEXTDRAW_STRUCT_OFFSET
            0A8D: 27@ readMem 27@ sz 1 vp 0 // READ FIRST BYTE - SECURITY_CHECK
            IF 27@ > 0
            THEN 0A8D: 30@ readMem 31@ sz 4 vp 0 
            ELSE 30@ = 0
            END
        END
       
        IF 17@ == 7 // 0.3.7 R5
        THEN
            0A8E: 31@ = 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@ += 0x1C // SAMP_PPOOL_TEXTDRAW_OFFSET
            0A8D: 31@ readMem 31@ sz 4 vp 0
            0@ *= 0x4 // TEXTDRAW_ID * 4
            005A: 31@ += 0@
            0A8D: 30@ readMem 31@ sz 4 vp 0
        END
        IF 30@ == TRUE
        THEN
            31@ += 0x2400  // SAMP_TEXTDRAW_STRUCT_OFFSET
            0A8D: 31@ readMem 31@ sz 4 vp 0
            IF 31@ > 0
            THEN
                IF 1@ == 1
                THEN
                    0A8E: 29@ = 31@ + 0x985 // SAMP_TEXTDRAW_ALIGN_1_OFFSET
                    0A8C: writeMem 29@ sz 1 vl 1 vp 0
                    0A8E: 28@ = 31@ + 0x970 // SAMP_TEXTDRAW_ALIGN_2_OFFSET
                    0A8C: writeMem 28@ sz 1 vl 0 vp 0
                    0A8E: 27@ = 31@ + 0x986 // SAMP_TEXTDRAW_ALIGN_3_OFFSET
                    0A8C: writeMem 27@ sz 1 vl 0 vp 0
                END
                IF 1@ == 2
                THEN
                    0A8E: 29@ = 31@ + 0x985 // SAMP_TEXTDRAW_ALIGN_1_OFFSET
                    0A8C: writeMem 29@ sz 1 vl 0 vp 0
                    0A8E: 28@ = 31@ + 0x970 // SAMP_TEXTDRAW_ALIGN_2_OFFSET
                    0A8C: writeMem 28@ sz 1 vl 1 vp 0
                    0A8E: 27@ = 31@ + 0x986 // SAMP_TEXTDRAW_ALIGN_3_OFFSET
                    0A8C: writeMem 27@ sz 1 vl 0 vp 0
                END
                IF 1@ == 3
                THEN
                    0A8E: 29@ = 31@ + 0x985 // SAMP_TEXTDRAW_ALIGN_1_OFFSET
                    0A8C: writeMem 29@ sz 1 vl 0 vp 0
                    0A8E: 28@ = 31@ + 0x970 // SAMP_TEXTDRAW_ALIGN_2_OFFSET
                    0A8C: writeMem 28@ sz 1 vl 0 vp 0
                    0A8E: 27@ = 31@ + 0x986 // SAMP_TEXTDRAW_ALIGN_3_OFFSET
                    0A8C: writeMem 27@ sz 1 vl 1 vp 0
                END
            END
        END
    END
0AA3: freelib 31@
END
0AB2: 0
PHP:
:SetTextdrawProportional
{
    0AB1: @SetTextdrawProportional 2 ID 1000 Proportional 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: 31@ = 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@ += 0x10 // SAMP_PPOOL_TEXTDRAW_OFFSET
            0A8D: 31@ readMem 31@ sz 4 vp 0
            0@ *= 0x4 // TEXTDRAW_ID * 4
            005A: 31@ += 0@
            0A8E: 27@ = 31@ + 0x2400  // SAMP_TEXTDRAW_STRUCT_OFFSET
            0A8D: 27@ readMem 27@ sz 1 vp 0 // READ FIRST BYTE - SECURITY_CHECK
            IF 27@ > 0
            THEN 0A8D: 30@ readMem 31@ sz 4 vp 0 
            ELSE 30@ = 0
            END
        END
        IF 17@ == 2 // 0.3.7 R2
        THEN
            0A8E: 31@ = 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@ += 0x20 // SAMP_PPOOL_TEXTDRAW_OFFSET
            0A8D: 31@ readMem 31@ sz 4 vp 0
            0@ *= 0x4 // TEXTDRAW_ID * 4
            005A: 31@ += 0@
            0A8E: 27@ = 31@ + 0x2400  // SAMP_TEXTDRAW_STRUCT_OFFSET
            0A8D: 27@ readMem 27@ sz 1 vp 0 // READ FIRST BYTE - SECURITY_CHECK
            IF 27@ > 0
            THEN 0A8D: 30@ readMem 31@ sz 4 vp 0 
            ELSE 30@ = 0
            END
        END
       
        IF 17@ == 3 // 0.3.DL
        THEN   
            0A8E: 31@ = 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@ += 0x20 // SAMP_PPOOL_TEXTDRAW_OFFSET
            0A8D: 31@ readMem 31@ sz 4 vp 0
            0@ *= 0x4 // TEXTDRAW_ID * 4
            005A: 31@ += 0@
            0A8E: 27@ = 31@ + 0x2400  // SAMP_TEXTDRAW_STRUCT_OFFSET
            0A8D: 27@ readMem 27@ sz 1 vp 0 // READ FIRST BYTE - SECURITY_CHECK
            IF 27@ > 0
            THEN 0A8D: 30@ readMem 31@ sz 4 vp 0 
            ELSE 30@ = 0
            END
        END
       
        IF 17@ == 4 // 0.3.7 R3
        THEN
            0A8E: 31@ = 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@ += 0x20 // SAMP_PPOOL_TEXTDRAW_OFFSET
            0A8D: 31@ readMem 31@ sz 4 vp 0
            0@ *= 0x4 // TEXTDRAW_ID * 4
            005A: 31@ += 0@
            0A8E: 27@ = 31@ + 0x2400  // SAMP_TEXTDRAW_STRUCT_OFFSET
            0A8D: 27@ readMem 27@ sz 1 vp 0 // READ FIRST BYTE - SECURITY_CHECK
            IF 27@ > 0
            THEN 0A8D: 30@ readMem 31@ sz 4 vp 0 
            ELSE 30@ = 0
            END
        END
       
        IF 17@ == 5 // 0.3.7 R4
        THEN
            0A8E: 31@ = 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@ += 0x20 // SAMP_PPOOL_TEXTDRAW_OFFSET
            0A8D: 31@ readMem 31@ sz 4 vp 0
            0@ *= 0x4 // TEXTDRAW_ID * 4
            005A: 31@ += 0@
            0A8E: 27@ = 31@ + 0x2400  // SAMP_TEXTDRAW_STRUCT_OFFSET
            0A8D: 27@ readMem 27@ sz 1 vp 0 // READ FIRST BYTE - SECURITY_CHECK
            IF 27@ > 0
            THEN 0A8D: 30@ readMem 31@ sz 4 vp 0 
            ELSE 30@ = 0
            END
        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
            31@ += 0x3DE // SAMP_PPOOLS_OFFSET
            0A8D: 31@ readMem 31@ sz 4 vp 0
            31@ += 0x1C // SAMP_PPOOL_TEXTDRAW_OFFSET
            0A8D: 31@ readMem 31@ sz 4 vp 0
            0@ *= 0x4 // TEXTDRAW_ID * 4
            005A: 31@ += 0@
            0A8E: 27@ = 31@ + 0x2400  // SAMP_TEXTDRAW_STRUCT_OFFSET
            0A8D: 27@ readMem 27@ sz 1 vp 0 // READ FIRST BYTE - SECURITY_CHECK
            IF 27@ > 0
            THEN 0A8D: 30@ readMem 31@ sz 4 vp 0 
            ELSE 30@ = 0
            END
        END
       
        IF 17@ == 7 // 0.3.7 R5
        THEN
            0A8E: 31@ = 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@ += 0x1C // SAMP_PPOOL_TEXTDRAW_OFFSET
            0A8D: 31@ readMem 31@ sz 4 vp 0
            0@ *= 0x4 // TEXTDRAW_ID * 4
            005A: 31@ += 0@
            0A8D: 30@ readMem 31@ sz 4 vp 0
        END
        IF 30@ == TRUE
        THEN
            31@ += 0x2400  // SAMP_TEXTDRAW_STRUCT_OFFSET
            0A8D: 31@ readMem 31@ sz 4 vp 0
            IF 31@ > 0
            THEN
                0A8E: 29@ = 31@ + 0x97E // SAMP_TEXTDRAW_PROPORTIONAL_OFFSET
                0A8C: writeMem 29@ sz 1 vl 1@ vp 0
            END
        END
    END
0AA3: freelib 31@
END
0AB2: 0
PHP:
:SetTextdrawLetter
{
    0AB1: @SetTextdrawLetter 4 ID 1000 Size 0.25 1.0 color 0xFF00FF00
}
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: 31@ = 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@ += 0x10 // SAMP_PPOOL_TEXTDRAW_OFFSET
            0A8D: 31@ readMem 31@ sz 4 vp 0
            0@ *= 0x4 // TEXTDRAW_ID * 4
            005A: 31@ += 0@
            0A8E: 27@ = 31@ + 0x2400  // SAMP_TEXTDRAW_STRUCT_OFFSET
            0A8D: 27@ readMem 27@ sz 1 vp 0 // READ FIRST BYTE - SECURITY_CHECK
            IF 27@ > 0
            THEN 0A8D: 30@ readMem 31@ sz 4 vp 0 
            ELSE 30@ = 0
            END
        END
        IF 17@ == 2 // 0.3.7 R2
        THEN
            0A8E: 31@ = 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@ += 0x20 // SAMP_PPOOL_TEXTDRAW_OFFSET
            0A8D: 31@ readMem 31@ sz 4 vp 0
            0@ *= 0x4 // TEXTDRAW_ID * 4
            005A: 31@ += 0@
            0A8E: 27@ = 31@ + 0x2400  // SAMP_TEXTDRAW_STRUCT_OFFSET
            0A8D: 27@ readMem 27@ sz 1 vp 0 // READ FIRST BYTE - SECURITY_CHECK
            IF 27@ > 0
            THEN 0A8D: 30@ readMem 31@ sz 4 vp 0 
            ELSE 30@ = 0
            END
        END
       
        IF 17@ == 3 // 0.3.DL
        THEN   
            0A8E: 31@ = 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@ += 0x20 // SAMP_PPOOL_TEXTDRAW_OFFSET
            0A8D: 31@ readMem 31@ sz 4 vp 0
            0@ *= 0x4 // TEXTDRAW_ID * 4
            005A: 31@ += 0@
            0A8E: 27@ = 31@ + 0x2400  // SAMP_TEXTDRAW_STRUCT_OFFSET
            0A8D: 27@ readMem 27@ sz 1 vp 0 // READ FIRST BYTE - SECURITY_CHECK
            IF 27@ > 0
            THEN 0A8D: 30@ readMem 31@ sz 4 vp 0 
            ELSE 30@ = 0
            END
        END
       
        IF 17@ == 4 // 0.3.7 R3
        THEN
            0A8E: 31@ = 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@ += 0x20 // SAMP_PPOOL_TEXTDRAW_OFFSET
            0A8D: 31@ readMem 31@ sz 4 vp 0
            0@ *= 0x4 // TEXTDRAW_ID * 4
            005A: 31@ += 0@
            0A8E: 27@ = 31@ + 0x2400  // SAMP_TEXTDRAW_STRUCT_OFFSET
            0A8D: 27@ readMem 27@ sz 1 vp 0 // READ FIRST BYTE - SECURITY_CHECK
            IF 27@ > 0
            THEN 0A8D: 30@ readMem 31@ sz 4 vp 0 
            ELSE 30@ = 0
            END
        END
       
        IF 17@ == 5 // 0.3.7 R4
        THEN
            0A8E: 31@ = 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@ += 0x20 // SAMP_PPOOL_TEXTDRAW_OFFSET
            0A8D: 31@ readMem 31@ sz 4 vp 0
            0@ *= 0x4 // TEXTDRAW_ID * 4
            005A: 31@ += 0@
            0A8E: 27@ = 31@ + 0x2400  // SAMP_TEXTDRAW_STRUCT_OFFSET
            0A8D: 27@ readMem 27@ sz 1 vp 0 // READ FIRST BYTE - SECURITY_CHECK
            IF 27@ > 0
            THEN 0A8D: 30@ readMem 31@ sz 4 vp 0 
            ELSE 30@ = 0
            END
        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
            31@ += 0x3DE // SAMP_PPOOLS_OFFSET
            0A8D: 31@ readMem 31@ sz 4 vp 0
            31@ += 0x1C // SAMP_PPOOL_TEXTDRAW_OFFSET
            0A8D: 31@ readMem 31@ sz 4 vp 0
            0@ *= 0x4 // TEXTDRAW_ID * 4
            005A: 31@ += 0@
            0A8E: 27@ = 31@ + 0x2400  // SAMP_TEXTDRAW_STRUCT_OFFSET
            0A8D: 27@ readMem 27@ sz 1 vp 0 // READ FIRST BYTE - SECURITY_CHECK
            IF 27@ > 0
            THEN 0A8D: 30@ readMem 31@ sz 4 vp 0 
            ELSE 30@ = 0
            END
        END
       
        IF 17@ == 7 // 0.3.7 R5
        THEN
            0A8E: 31@ = 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@ += 0x1C // SAMP_PPOOL_TEXTDRAW_OFFSET
            0A8D: 31@ readMem 31@ sz 4 vp 0
            0@ *= 0x4 // TEXTDRAW_ID * 4
            005A: 31@ += 0@
            0A8D: 30@ readMem 31@ sz 4 vp 0
        END
        IF 30@ == TRUE
        THEN
            31@ += 0x2400  // SAMP_TEXTDRAW_STRUCT_OFFSET
            0A8D: 31@ readMem 31@ sz 4 vp 0
            IF 31@ > 0
            THEN
                0A8E: 29@ = 31@ + 0x963 // SAMP_TEXTDRAW_LETTER_WIDTH_OFFSET
                0A8C: writeMem 29@ sz 4 vl 1@ vp 0
                0A8E: 28@ = 31@ + 0x967 // SAMP_TEXTDRAW_LETTER_HEIGHT_OFFSET
                0A8C: writeMem 28@ sz 4 vl 2@ vp 0
                0A8E: 27@ = 31@ + 0x96B // SAMP_TEXTDRAW_LETTER_COLOR_OFFSET
                0A8C: writeMem 27@ sz 4 vl 3@ vp 0
            END
        END
    END
0AA3: freelib 31@
END
0AB2: 0
PHP:
:SetTextdrawPosition
{
    0AB1: @SetTextdrawPosition 3 ID 1000 XY 320.0 224.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: 31@ = 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@ += 0x10 // SAMP_PPOOL_TEXTDRAW_OFFSET
            0A8D: 31@ readMem 31@ sz 4 vp 0
            0@ *= 0x4 // TEXTDRAW_ID * 4
            005A: 31@ += 0@
            0A8E: 27@ = 31@ + 0x2400  // SAMP_TEXTDRAW_STRUCT_OFFSET
            0A8D: 27@ readMem 27@ sz 1 vp 0 // READ FIRST BYTE - SECURITY_CHECK
            IF 27@ > 0
            THEN 0A8D: 30@ readMem 31@ sz 4 vp 0 
            ELSE 30@ = 0
            END
        END
        IF 17@ == 2 // 0.3.7 R2
        THEN
            0A8E: 31@ = 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@ += 0x20 // SAMP_PPOOL_TEXTDRAW_OFFSET
            0A8D: 31@ readMem 31@ sz 4 vp 0
            0@ *= 0x4 // TEXTDRAW_ID * 4
            005A: 31@ += 0@
            0A8E: 27@ = 31@ + 0x2400  // SAMP_TEXTDRAW_STRUCT_OFFSET
            0A8D: 27@ readMem 27@ sz 1 vp 0 // READ FIRST BYTE - SECURITY_CHECK
            IF 27@ > 0
            THEN 0A8D: 30@ readMem 31@ sz 4 vp 0 
            ELSE 30@ = 0
            END
        END
       
        IF 17@ == 3 // 0.3.DL
        THEN   
            0A8E: 31@ = 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@ += 0x20 // SAMP_PPOOL_TEXTDRAW_OFFSET
            0A8D: 31@ readMem 31@ sz 4 vp 0
            0@ *= 0x4 // TEXTDRAW_ID * 4
            005A: 31@ += 0@
            0A8E: 27@ = 31@ + 0x2400  // SAMP_TEXTDRAW_STRUCT_OFFSET
            0A8D: 27@ readMem 27@ sz 1 vp 0 // READ FIRST BYTE - SECURITY_CHECK
            IF 27@ > 0
            THEN 0A8D: 30@ readMem 31@ sz 4 vp 0 
            ELSE 30@ = 0
            END
        END
       
        IF 17@ == 4 // 0.3.7 R3
        THEN
            0A8E: 31@ = 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@ += 0x20 // SAMP_PPOOL_TEXTDRAW_OFFSET
            0A8D: 31@ readMem 31@ sz 4 vp 0
            0@ *= 0x4 // TEXTDRAW_ID * 4
            005A: 31@ += 0@
            0A8E: 27@ = 31@ + 0x2400  // SAMP_TEXTDRAW_STRUCT_OFFSET
            0A8D: 27@ readMem 27@ sz 1 vp 0 // READ FIRST BYTE - SECURITY_CHECK
            IF 27@ > 0
            THEN 0A8D: 30@ readMem 31@ sz 4 vp 0 
            ELSE 30@ = 0
            END
        END
       
        IF 17@ == 5 // 0.3.7 R4
        THEN
            0A8E: 31@ = 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@ += 0x20 // SAMP_PPOOL_TEXTDRAW_OFFSET
            0A8D: 31@ readMem 31@ sz 4 vp 0
            0@ *= 0x4 // TEXTDRAW_ID * 4
            005A: 31@ += 0@
            0A8E: 27@ = 31@ + 0x2400  // SAMP_TEXTDRAW_STRUCT_OFFSET
            0A8D: 27@ readMem 27@ sz 1 vp 0 // READ FIRST BYTE - SECURITY_CHECK
            IF 27@ > 0
            THEN 0A8D: 30@ readMem 31@ sz 4 vp 0 
            ELSE 30@ = 0
            END
        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
            31@ += 0x3DE // SAMP_PPOOLS_OFFSET
            0A8D: 31@ readMem 31@ sz 4 vp 0
            31@ += 0x1C // SAMP_PPOOL_TEXTDRAW_OFFSET
            0A8D: 31@ readMem 31@ sz 4 vp 0
            0@ *= 0x4 // TEXTDRAW_ID * 4
            005A: 31@ += 0@
            0A8E: 27@ = 31@ + 0x2400  // SAMP_TEXTDRAW_STRUCT_OFFSET
            0A8D: 27@ readMem 27@ sz 1 vp 0 // READ FIRST BYTE - SECURITY_CHECK
            IF 27@ > 0
            THEN 0A8D: 30@ readMem 31@ sz 4 vp 0 
            ELSE 30@ = 0
            END
        END
       
        IF 17@ == 7 // 0.3.7 R5
        THEN
            0A8E: 31@ = 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@ += 0x1C // SAMP_PPOOL_TEXTDRAW_OFFSET
            0A8D: 31@ readMem 31@ sz 4 vp 0
            0@ *= 0x4 // TEXTDRAW_ID * 4
            005A: 31@ += 0@
            0A8D: 30@ readMem 31@ sz 4 vp 0
        END
        IF 30@ == TRUE
        THEN
            31@ += 0x2400  // SAMP_TEXTDRAW_STRUCT_OFFSET
            0A8D: 31@ readMem 31@ sz 4 vp 0
            IF 31@ > 0
            THEN
                0A8E: 29@ = 31@ + 0x98B // SAMP_TEXTDRAW_POSITION_X_OFFSET
                0A8C: writeMem 29@ sz 4 vl 1@ vp 0
                0A8E: 28@ = 31@ + 0x98F // SAMP_TEXTDRAW_POSITION_Y_OFFSET
                0A8C: writeMem 28@ sz 4 vl 2@ vp 0
            END
        END
    END
0AA3: freelib 31@
END
0AB2: 0
PHP:
:SetTextdrawShadow
{
    0AB1: @SetTextdrawShadow 3 ID 1000 Shadow 1 Color 0xFF00FF00
}
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: 31@ = 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@ += 0x10 // SAMP_PPOOL_TEXTDRAW_OFFSET
            0A8D: 31@ readMem 31@ sz 4 vp 0
            0@ *= 0x4 // TEXTDRAW_ID * 4
            005A: 31@ += 0@
            0A8E: 27@ = 31@ + 0x2400  // SAMP_TEXTDRAW_STRUCT_OFFSET
            0A8D: 27@ readMem 27@ sz 1 vp 0 // READ FIRST BYTE - SECURITY_CHECK
            IF 27@ > 0
            THEN 0A8D: 30@ readMem 31@ sz 4 vp 0 
            ELSE 30@ = 0
            END
        END
        IF 17@ == 2 // 0.3.7 R2
        THEN
            0A8E: 31@ = 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@ += 0x20 // SAMP_PPOOL_TEXTDRAW_OFFSET
            0A8D: 31@ readMem 31@ sz 4 vp 0
            0@ *= 0x4 // TEXTDRAW_ID * 4
            005A: 31@ += 0@
            0A8E: 27@ = 31@ + 0x2400  // SAMP_TEXTDRAW_STRUCT_OFFSET
            0A8D: 27@ readMem 27@ sz 1 vp 0 // READ FIRST BYTE - SECURITY_CHECK
            IF 27@ > 0
            THEN 0A8D: 30@ readMem 31@ sz 4 vp 0 
            ELSE 30@ = 0
            END
        END
       
        IF 17@ == 3 // 0.3.DL
        THEN   
            0A8E: 31@ = 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@ += 0x20 // SAMP_PPOOL_TEXTDRAW_OFFSET
            0A8D: 31@ readMem 31@ sz 4 vp 0
            0@ *= 0x4 // TEXTDRAW_ID * 4
            005A: 31@ += 0@
            0A8E: 27@ = 31@ + 0x2400  // SAMP_TEXTDRAW_STRUCT_OFFSET
            0A8D: 27@ readMem 27@ sz 1 vp 0 // READ FIRST BYTE - SECURITY_CHECK
            IF 27@ > 0
            THEN 0A8D: 30@ readMem 31@ sz 4 vp 0 
            ELSE 30@ = 0
            END
        END
       
        IF 17@ == 4 // 0.3.7 R3
        THEN
            0A8E: 31@ = 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@ += 0x20 // SAMP_PPOOL_TEXTDRAW_OFFSET
            0A8D: 31@ readMem 31@ sz 4 vp 0
            0@ *= 0x4 // TEXTDRAW_ID * 4
            005A: 31@ += 0@
            0A8E: 27@ = 31@ + 0x2400  // SAMP_TEXTDRAW_STRUCT_OFFSET
            0A8D: 27@ readMem 27@ sz 1 vp 0 // READ FIRST BYTE - SECURITY_CHECK
            IF 27@ > 0
            THEN 0A8D: 30@ readMem 31@ sz 4 vp 0 
            ELSE 30@ = 0
            END
        END
       
        IF 17@ == 5 // 0.3.7 R4
        THEN
            0A8E: 31@ = 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@ += 0x20 // SAMP_PPOOL_TEXTDRAW_OFFSET
            0A8D: 31@ readMem 31@ sz 4 vp 0
            0@ *= 0x4 // TEXTDRAW_ID * 4
            005A: 31@ += 0@
            0A8E: 27@ = 31@ + 0x2400  // SAMP_TEXTDRAW_STRUCT_OFFSET
            0A8D: 27@ readMem 27@ sz 1 vp 0 // READ FIRST BYTE - SECURITY_CHECK
            IF 27@ > 0
            THEN 0A8D: 30@ readMem 31@ sz 4 vp 0 
            ELSE 30@ = 0
            END
        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
            31@ += 0x3DE // SAMP_PPOOLS_OFFSET
            0A8D: 31@ readMem 31@ sz 4 vp 0
            31@ += 0x1C // SAMP_PPOOL_TEXTDRAW_OFFSET
            0A8D: 31@ readMem 31@ sz 4 vp 0
            0@ *= 0x4 // TEXTDRAW_ID * 4
            005A: 31@ += 0@
            0A8E: 27@ = 31@ + 0x2400  // SAMP_TEXTDRAW_STRUCT_OFFSET
            0A8D: 27@ readMem 27@ sz 1 vp 0 // READ FIRST BYTE - SECURITY_CHECK
            IF 27@ > 0
            THEN 0A8D: 30@ readMem 31@ sz 4 vp 0 
            ELSE 30@ = 0
            END
        END
       
        IF 17@ == 7 // 0.3.7 R5
        THEN
            0A8E: 31@ = 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@ += 0x1C // SAMP_PPOOL_TEXTDRAW_OFFSET
            0A8D: 31@ readMem 31@ sz 4 vp 0
            0@ *= 0x4 // TEXTDRAW_ID * 4
            005A: 31@ += 0@
            0A8D: 30@ readMem 31@ sz 4 vp 0
        END
        IF 30@ == TRUE
        THEN
            31@ += 0x2400  // SAMP_TEXTDRAW_STRUCT_OFFSET
            0A8D: 31@ readMem 31@ sz 4 vp 0
            IF 31@ > 0
            THEN
                0A8E: 29@ = 31@ + 0x983 // SAMP_TEXTDRAW_SHADOW_OFFSET
                0A8C: writeMem 29@ sz 1 vl 1@ vp 0
                0A8E: 28@ = 31@ + 0x97F // SAMP_TEXTDRAW_SHADOW_COLOR_OFFSET
                0A8C: writeMem 28@ sz 4 vl 2@ vp 0
            END
        END
    END
0AA3: freelib 31@
END
0AB2: 0
PHP:
:SetTextdrawOutline
{
    0AB1: @SetTextdrawOutline 3 ID 1000 OutlineSize 2 Color 0xFF00FF00
}
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: 31@ = 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@ += 0x10 // SAMP_PPOOL_TEXTDRAW_OFFSET
            0A8D: 31@ readMem 31@ sz 4 vp 0
            0@ *= 0x4 // TEXTDRAW_ID * 4
            005A: 31@ += 0@
            0A8E: 27@ = 31@ + 0x2400  // SAMP_TEXTDRAW_STRUCT_OFFSET
            0A8D: 27@ readMem 27@ sz 1 vp 0 // READ FIRST BYTE - SECURITY_CHECK
            IF 27@ > 0
            THEN 0A8D: 30@ readMem 31@ sz 4 vp 0 
            ELSE 30@ = 0
            END
        END
        IF 17@ == 2 // 0.3.7 R2
        THEN
            0A8E: 31@ = 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@ += 0x20 // SAMP_PPOOL_TEXTDRAW_OFFSET
            0A8D: 31@ readMem 31@ sz 4 vp 0
            0@ *= 0x4 // TEXTDRAW_ID * 4
            005A: 31@ += 0@
            0A8E: 27@ = 31@ + 0x2400  // SAMP_TEXTDRAW_STRUCT_OFFSET
            0A8D: 27@ readMem 27@ sz 1 vp 0 // READ FIRST BYTE - SECURITY_CHECK
            IF 27@ > 0
            THEN 0A8D: 30@ readMem 31@ sz 4 vp 0 
            ELSE 30@ = 0
            END
        END
       
        IF 17@ == 3 // 0.3.DL
        THEN   
            0A8E: 31@ = 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@ += 0x20 // SAMP_PPOOL_TEXTDRAW_OFFSET
            0A8D: 31@ readMem 31@ sz 4 vp 0
            0@ *= 0x4 // TEXTDRAW_ID * 4
            005A: 31@ += 0@
            0A8E: 27@ = 31@ + 0x2400  // SAMP_TEXTDRAW_STRUCT_OFFSET
            0A8D: 27@ readMem 27@ sz 1 vp 0 // READ FIRST BYTE - SECURITY_CHECK
            IF 27@ > 0
            THEN 0A8D: 30@ readMem 31@ sz 4 vp 0 
            ELSE 30@ = 0
            END
        END
       
        IF 17@ == 4 // 0.3.7 R3
        THEN
            0A8E: 31@ = 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@ += 0x20 // SAMP_PPOOL_TEXTDRAW_OFFSET
            0A8D: 31@ readMem 31@ sz 4 vp 0
            0@ *= 0x4 // TEXTDRAW_ID * 4
            005A: 31@ += 0@
            0A8E: 27@ = 31@ + 0x2400  // SAMP_TEXTDRAW_STRUCT_OFFSET
            0A8D: 27@ readMem 27@ sz 1 vp 0 // READ FIRST BYTE - SECURITY_CHECK
            IF 27@ > 0
            THEN 0A8D: 30@ readMem 31@ sz 4 vp 0 
            ELSE 30@ = 0
            END
        END
       
        IF 17@ == 5 // 0.3.7 R4
        THEN
            0A8E: 31@ = 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@ += 0x20 // SAMP_PPOOL_TEXTDRAW_OFFSET
            0A8D: 31@ readMem 31@ sz 4 vp 0
            0@ *= 0x4 // TEXTDRAW_ID * 4
            005A: 31@ += 0@
            0A8E: 27@ = 31@ + 0x2400  // SAMP_TEXTDRAW_STRUCT_OFFSET
            0A8D: 27@ readMem 27@ sz 1 vp 0 // READ FIRST BYTE - SECURITY_CHECK
            IF 27@ > 0
            THEN 0A8D: 30@ readMem 31@ sz 4 vp 0 
            ELSE 30@ = 0
            END
        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
            31@ += 0x3DE // SAMP_PPOOLS_OFFSET
            0A8D: 31@ readMem 31@ sz 4 vp 0
            31@ += 0x1C // SAMP_PPOOL_TEXTDRAW_OFFSET
            0A8D: 31@ readMem 31@ sz 4 vp 0
            0@ *= 0x4 // TEXTDRAW_ID * 4
            005A: 31@ += 0@
            0A8E: 27@ = 31@ + 0x2400  // SAMP_TEXTDRAW_STRUCT_OFFSET
            0A8D: 27@ readMem 27@ sz 1 vp 0 // READ FIRST BYTE - SECURITY_CHECK
            IF 27@ > 0
            THEN 0A8D: 30@ readMem 31@ sz 4 vp 0 
            ELSE 30@ = 0
            END
        END
       
        IF 17@ == 7 // 0.3.7 R5
        THEN
            0A8E: 31@ = 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@ += 0x1C // SAMP_PPOOL_TEXTDRAW_OFFSET
            0A8D: 31@ readMem 31@ sz 4 vp 0
            0@ *= 0x4 // TEXTDRAW_ID * 4
            005A: 31@ += 0@
            0A8D: 30@ readMem 31@ sz 4 vp 0
        END
        IF 30@ == TRUE
        THEN
            31@ += 0x2400  // SAMP_TEXTDRAW_STRUCT_OFFSET
            0A8D: 31@ readMem 31@ sz 4 vp 0
            IF 31@ > 0
            THEN
                0A8E: 29@ = 31@ + 0x984 // SAMP_TEXTDRAW_OUTLINE_OFFSET
                0A8C: writeMem 29@ sz 1 vl 1@ vp 0
                0A8E: 28@ = 31@ + 0x97F // SAMP_TEXTDRAW_OUTLINE_COLOR_OFFSET
                0A8C: writeMem 28@ sz 4 vl 2@ vp 0
            END
        END
    END
0AA3: freelib 31@
END
0AB2: 0
PHP:
:SetTextdrawState
{
    0AB1: @SetTextdrawState 2 ID 1000 State 1
    States:
    1 - Visible
    0 - Hidden
}
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: 31@ = 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@ += 0x10 // SAMP_PPOOL_TEXTDRAW_OFFSET
            0A8D: 31@ readMem 31@ sz 4 vp 0
            0@ *= 0x4 // TEXTDRAW_ID * 4
            005A: 31@ += 0@
            0A8E: 27@ = 31@ + 0x2400  // SAMP_TEXTDRAW_STRUCT_OFFSET
            0A8D: 27@ readMem 27@ sz 1 vp 0 // READ FIRST BYTE - SECURITY_CHECK
            IF 27@ > 0
            THEN 0A8C: writeMem 31@ sz 1 vl 1@ vp 0
            END
        END
        IF 17@ == 2 // 0.3.7 R2
        THEN
            0A8E: 31@ = 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@ += 0x20 // SAMP_PPOOL_TEXTDRAW_OFFSET
            0A8D: 31@ readMem 31@ sz 4 vp 0
            0@ *= 0x4 // TEXTDRAW_ID * 4
            005A: 31@ += 0@
            0A8E: 27@ = 31@ + 0x2400  // SAMP_TEXTDRAW_STRUCT_OFFSET
            0A8D: 27@ readMem 27@ sz 1 vp 0 // READ FIRST BYTE - SECURITY_CHECK
            IF 27@ > 0
            THEN 0A8C: writeMem 31@ sz 1 vl 1@ vp 0 
            END
        END
       
        IF 17@ == 3 // 0.3.DL
        THEN
            0A8E: 31@ = 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@ += 0x20 // SAMP_PPOOL_TEXTDRAW_OFFSET
            0A8D: 31@ readMem 31@ sz 4 vp 0
            0@ *= 0x4 // TEXTDRAW_ID * 4
            005A: 31@ += 0@
            0A8E: 27@ = 31@ + 0x2400  // SAMP_TEXTDRAW_STRUCT_OFFSET
            0A8D: 27@ readMem 27@ sz 1 vp 0 // READ FIRST BYTE - SECURITY_CHECK
            IF 27@ > 0
            THEN 0A8C: writeMem 31@ sz 1 vl 1@ vp 0 
            END
        END
       
        IF 17@ == 4 // 0.3.7 R3
        THEN
            0A8E: 31@ = 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@ += 0x20 // SAMP_PPOOL_TEXTDRAW_OFFSET
            0A8D: 31@ readMem 31@ sz 4 vp 0
            0@ *= 0x4 // TEXTDRAW_ID * 4
            005A: 31@ += 0@
            0A8E: 27@ = 31@ + 0x2400  // SAMP_TEXTDRAW_STRUCT_OFFSET
            0A8D: 27@ readMem 27@ sz 1 vp 0 // READ FIRST BYTE - SECURITY_CHECK
            IF 27@ > 0
            THEN 0A8C: writeMem 31@ sz 1 vl 1@ vp 0 
            END
        END
       
        IF 17@ == 5 // 0.3.7 R4
        THEN
            0A8E: 31@ = 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@ += 0x20 // SAMP_PPOOL_TEXTDRAW_OFFSET
            0A8D: 31@ readMem 31@ sz 4 vp 0
            0@ *= 0x4 // TEXTDRAW_ID * 4
            005A: 31@ += 0@
            0A8E: 27@ = 31@ + 0x2400  // SAMP_TEXTDRAW_STRUCT_OFFSET
            0A8D: 27@ readMem 27@ sz 1 vp 0 // READ FIRST BYTE - SECURITY_CHECK
            IF 27@ > 0
            THEN 0A8C: writeMem 31@ sz 1 vl 1@ vp 0 
            END
        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
            31@ += 0x3DE // SAMP_PPOOLS_OFFSET
            0A8D: 31@ readMem 31@ sz 4 vp 0
            31@ += 0x1C // SAMP_PPOOL_TEXTDRAW_OFFSET
            0A8D: 31@ readMem 31@ sz 4 vp 0
            0@ *= 0x4 // TEXTDRAW_ID * 4
            005A: 31@ += 0@
            0A8E: 27@ = 31@ + 0x2400  // SAMP_TEXTDRAW_STRUCT_OFFSET
            0A8D: 27@ readMem 27@ sz 1 vp 0 // READ FIRST BYTE - SECURITY_CHECK
            IF 27@ > 0
            THEN 0A8C: writeMem 31@ sz 1 vl 1@ vp 0 
            END
        END
       
        IF 17@ == 7 // 0.3.7 R5
        THEN
            0A8E: 31@ = 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@ += 0x1C // SAMP_PPOOL_TEXTDRAW_OFFSET
            0A8D: 31@ readMem 31@ sz 4 vp 0
            0@ *= 0x4 // TEXTDRAW_ID * 4
            005A: 31@ += 0@
            0A8E: 27@ = 31@ + 0x2400  // SAMP_TEXTDRAW_STRUCT_OFFSET
            0A8D: 27@ readMem 27@ sz 1 vp 0 // READ FIRST BYTE - SECURITY_CHECK
            IF 27@ > 0
            THEN 0A8C: writeMem 31@ sz 1 vl 1@ vp 0 
            END
        END
    END
0AA3: freelib 31@
END
0AB2: 0
 
Last edited:

Parazitas

God
Staff member
Joined
Jan 2, 2017
Messages
3,315
Solutions
7
Reaction score
935
Location
Lithuania
PHP:
:SetTextdrawText
{
    0AC8: 0@ = allocate_memory_size 1024
    0AD3: 0@ = format "Magic is Real!"
    0AB1: @SetTextdrawText 2 ID 1000 Text 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: 31@ = 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@ += 0x10 // SAMP_PPOOL_TEXTDRAW_OFFSET
            0A8D: 31@ readMem 31@ sz 4 vp 0
            0@ *= 0x4 // TEXTDRAW_ID * 4
            005A: 31@ += 0@
            0A8E: 27@ = 31@ + 0x2400  // SAMP_TEXTDRAW_STRUCT_OFFSET
            0A8D: 27@ readMem 27@ sz 1 vp 0 // READ FIRST BYTE - SECURITY_CHECK
            IF 27@ > 0
            THEN 0A8D: 30@ readMem 31@ sz 4 vp 0 
            ELSE 30@ = 0
            END
        END
        IF 17@ == 2 // 0.3.7 R2
        THEN
            0A8E: 31@ = 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@ += 0x20 // SAMP_PPOOL_TEXTDRAW_OFFSET
            0A8D: 31@ readMem 31@ sz 4 vp 0
            0@ *= 0x4 // TEXTDRAW_ID * 4
            005A: 31@ += 0@
            0A8E: 27@ = 31@ + 0x2400  // SAMP_TEXTDRAW_STRUCT_OFFSET
            0A8D: 27@ readMem 27@ sz 1 vp 0 // READ FIRST BYTE - SECURITY_CHECK
            IF 27@ > 0
            THEN 0A8D: 30@ readMem 31@ sz 4 vp 0 
            ELSE 30@ = 0
            END
        END
       
        IF 17@ == 3 // 0.3.DL
        THEN   
            0A8E: 31@ = 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@ += 0x20 // SAMP_PPOOL_TEXTDRAW_OFFSET
            0A8D: 31@ readMem 31@ sz 4 vp 0
            0@ *= 0x4 // TEXTDRAW_ID * 4
            005A: 31@ += 0@
            0A8E: 27@ = 31@ + 0x2400  // SAMP_TEXTDRAW_STRUCT_OFFSET
            0A8D: 27@ readMem 27@ sz 1 vp 0 // READ FIRST BYTE - SECURITY_CHECK
            IF 27@ > 0
            THEN 0A8D: 30@ readMem 31@ sz 4 vp 0 
            ELSE 30@ = 0
            END
        END
       
        IF 17@ == 4 // 0.3.7 R3
        THEN
            0A8E: 31@ = 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@ += 0x20 // SAMP_PPOOL_TEXTDRAW_OFFSET
            0A8D: 31@ readMem 31@ sz 4 vp 0
            0@ *= 0x4 // TEXTDRAW_ID * 4
            005A: 31@ += 0@
            0A8E: 27@ = 31@ + 0x2400  // SAMP_TEXTDRAW_STRUCT_OFFSET
            0A8D: 27@ readMem 27@ sz 1 vp 0 // READ FIRST BYTE - SECURITY_CHECK
            IF 27@ > 0
            THEN 0A8D: 30@ readMem 31@ sz 4 vp 0 
            ELSE 30@ = 0
            END
        END
       
        IF 17@ == 5 // 0.3.7 R4
        THEN
            0A8E: 31@ = 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@ += 0x20 // SAMP_PPOOL_TEXTDRAW_OFFSET
            0A8D: 31@ readMem 31@ sz 4 vp 0
            0@ *= 0x4 // TEXTDRAW_ID * 4
            005A: 31@ += 0@
            0A8E: 27@ = 31@ + 0x2400  // SAMP_TEXTDRAW_STRUCT_OFFSET
            0A8D: 27@ readMem 27@ sz 1 vp 0 // READ FIRST BYTE - SECURITY_CHECK
            IF 27@ > 0
            THEN 0A8D: 30@ readMem 31@ sz 4 vp 0 
            ELSE 30@ = 0
            END
        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
            31@ += 0x3DE // SAMP_PPOOLS_OFFSET
            0A8D: 31@ readMem 31@ sz 4 vp 0
            31@ += 0x1C // SAMP_PPOOL_TEXTDRAW_OFFSET
            0A8D: 31@ readMem 31@ sz 4 vp 0
            0@ *= 0x4 // TEXTDRAW_ID * 4
            005A: 31@ += 0@
            0A8E: 27@ = 31@ + 0x2400  // SAMP_TEXTDRAW_STRUCT_OFFSET
            0A8D: 27@ readMem 27@ sz 1 vp 0 // READ FIRST BYTE - SECURITY_CHECK
            IF 27@ > 0
            THEN 0A8D: 30@ readMem 31@ sz 4 vp 0 
            ELSE 30@ = 0
            END
        END
       
        IF 17@ == 7 // 0.3.7 R5
        THEN
            0A8E: 31@ = 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@ += 0x1C // SAMP_PPOOL_TEXTDRAW_OFFSET
            0A8D: 31@ readMem 31@ sz 4 vp 0
            0@ *= 0x4 // TEXTDRAW_ID * 4
            005A: 31@ += 0@
            0A8D: 30@ readMem 31@ sz 4 vp 0
        END
        IF 30@ == TRUE
        THEN
            31@ += 0x2400  // SAMP_TEXTDRAW_STRUCT_OFFSET
            0A8D: 31@ readMem 31@ sz 4 vp 0
            IF 31@ > 0
            THEN 0AA7: call_function 0x718660 num_params 2 pop 2 source 1@ destination 31@ _Returned: value 30@ // Gta Strcpy 
            END
        END
    END
0AA3: freelib 31@
END
0AB2: 0
PHP:
:SetTextdrawBox
{
    0AB1: @SetTextdrawBox 5 ID 1000 Box 1 Color 0xFF00FF00 Size 10.0 5.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: 31@ = 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@ += 0x10 // SAMP_PPOOL_TEXTDRAW_OFFSET
            0A8D: 31@ readMem 31@ sz 4 vp 0
            0@ *= 0x4 // TEXTDRAW_ID * 4
            005A: 31@ += 0@
            0A8E: 27@ = 31@ + 0x2400  // SAMP_TEXTDRAW_STRUCT_OFFSET
            0A8D: 27@ readMem 27@ sz 1 vp 0 // READ FIRST BYTE - SECURITY_CHECK
            IF 27@ > 0
            THEN 0A8D: 30@ readMem 31@ sz 4 vp 0 
            ELSE 30@ = 0
            END
        END
        IF 17@ == 2 // 0.3.7 R2
        THEN
            0A8E: 31@ = 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@ += 0x20 // SAMP_PPOOL_TEXTDRAW_OFFSET
            0A8D: 31@ readMem 31@ sz 4 vp 0
            0@ *= 0x4 // TEXTDRAW_ID * 4
            005A: 31@ += 0@
            0A8E: 27@ = 31@ + 0x2400  // SAMP_TEXTDRAW_STRUCT_OFFSET
            0A8D: 27@ readMem 27@ sz 1 vp 0 // READ FIRST BYTE - SECURITY_CHECK
            IF 27@ > 0
            THEN 0A8D: 30@ readMem 31@ sz 4 vp 0 
            ELSE 30@ = 0
            END
        END
       
        IF 17@ == 3 // 0.3.DL
        THEN   
            0A8E: 31@ = 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@ += 0x20 // SAMP_PPOOL_TEXTDRAW_OFFSET
            0A8D: 31@ readMem 31@ sz 4 vp 0
            0@ *= 0x4 // TEXTDRAW_ID * 4
            005A: 31@ += 0@
            0A8E: 27@ = 31@ + 0x2400  // SAMP_TEXTDRAW_STRUCT_OFFSET
            0A8D: 27@ readMem 27@ sz 1 vp 0 // READ FIRST BYTE - SECURITY_CHECK
            IF 27@ > 0
            THEN 0A8D: 30@ readMem 31@ sz 4 vp 0 
            ELSE 30@ = 0
            END
        END
       
        IF 17@ == 4 // 0.3.7 R3
        THEN
            0A8E: 31@ = 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@ += 0x20 // SAMP_PPOOL_TEXTDRAW_OFFSET
            0A8D: 31@ readMem 31@ sz 4 vp 0
            0@ *= 0x4 // TEXTDRAW_ID * 4
            005A: 31@ += 0@
            0A8E: 27@ = 31@ + 0x2400  // SAMP_TEXTDRAW_STRUCT_OFFSET
            0A8D: 27@ readMem 27@ sz 1 vp 0 // READ FIRST BYTE - SECURITY_CHECK
            IF 27@ > 0
            THEN 0A8D: 30@ readMem 31@ sz 4 vp 0 
            ELSE 30@ = 0
            END
        END
       
        IF 17@ == 5 // 0.3.7 R4
        THEN
            0A8E: 31@ = 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@ += 0x20 // SAMP_PPOOL_TEXTDRAW_OFFSET
            0A8D: 31@ readMem 31@ sz 4 vp 0
            0@ *= 0x4 // TEXTDRAW_ID * 4
            005A: 31@ += 0@
            0A8E: 27@ = 31@ + 0x2400  // SAMP_TEXTDRAW_STRUCT_OFFSET
            0A8D: 27@ readMem 27@ sz 1 vp 0 // READ FIRST BYTE - SECURITY_CHECK
            IF 27@ > 0
            THEN 0A8D: 30@ readMem 31@ sz 4 vp 0 
            ELSE 30@ = 0
            END
        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
            31@ += 0x3DE // SAMP_PPOOLS_OFFSET
            0A8D: 31@ readMem 31@ sz 4 vp 0
            31@ += 0x1C // SAMP_PPOOL_TEXTDRAW_OFFSET
            0A8D: 31@ readMem 31@ sz 4 vp 0
            0@ *= 0x4 // TEXTDRAW_ID * 4
            005A: 31@ += 0@
            0A8E: 27@ = 31@ + 0x2400  // SAMP_TEXTDRAW_STRUCT_OFFSET
            0A8D: 27@ readMem 27@ sz 1 vp 0 // READ FIRST BYTE - SECURITY_CHECK
            IF 27@ > 0
            THEN 0A8D: 30@ readMem 31@ sz 4 vp 0 
            ELSE 30@ = 0
            END
        END
       
        IF 17@ == 7 // 0.3.7 R5
        THEN
            0A8E: 31@ = 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@ += 0x1C // SAMP_PPOOL_TEXTDRAW_OFFSET
            0A8D: 31@ readMem 31@ sz 4 vp 0
            0@ *= 0x4 // TEXTDRAW_ID * 4
            005A: 31@ += 0@
            0A8D: 30@ readMem 31@ sz 4 vp 0
        END
        IF 30@ == TRUE
        THEN
            31@ += 0x2400  // SAMP_TEXTDRAW_STRUCT_OFFSET
            0A8D: 31@ readMem 31@ sz 4 vp 0
            IF 31@ > 0
            THEN
                0A8E: 29@ = 31@ + 0x971 // SAMP_TEXTDRAW_BOX_OFFSET
                0A8C: writeMem 29@ sz 1 vl 1@ vp 0
                0A8E: 28@ = 31@ + 0x97A // SAMP_TEXTDRAW_BOX_COLOR_OFFSET
                0A8C: writeMem 28@ sz 4 vl 2@ vp 0
                0A8E: 27@ = 31@ + 0x972 // SAMP_TEXTDRAW_BOX_SIZE_X_OFFSET
                0A8C: writeMem 27@ sz 4 vl 3@ vp 0
                0A8E: 27@ = 31@ + 0x976 // SAMP_TEXTDRAW_BOX_SIZE_Y_OFFSET
                0A8C: writeMem 27@ sz 4 vl 4@ vp 0
            END
        END
    END
0AA3: freelib 31@
END
0AB2: 0
PHP:
:SetTextdrawModel
{
    0AB1: @SetTextdrawModel 8 ID 1000 Model 1247 rotation 350.0 0.0 50.0 zoom 1.5 veh_color 0xF0 0xF0
}
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: 31@ = 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@ += 0x10 // SAMP_PPOOL_TEXTDRAW_OFFSET
            0A8D: 31@ readMem 31@ sz 4 vp 0
            0@ *= 0x4 // TEXTDRAW_ID * 4
            005A: 31@ += 0@
            0A8E: 27@ = 31@ + 0x2400  // SAMP_TEXTDRAW_STRUCT_OFFSET
            0A8D: 27@ readMem 27@ sz 1 vp 0 // READ FIRST BYTE - SECURITY_CHECK
            IF 27@ > 0
            THEN 0A8D: 30@ readMem 31@ sz 4 vp 0
            ELSE 30@ = 0
            END
        END
        IF 17@ == 2 // 0.3.7 R2
        THEN
            0A8E: 31@ = 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@ += 0x20 // SAMP_PPOOL_TEXTDRAW_OFFSET
            0A8D: 31@ readMem 31@ sz 4 vp 0
            0@ *= 0x4 // TEXTDRAW_ID * 4
            005A: 31@ += 0@
            0A8E: 27@ = 31@ + 0x2400  // SAMP_TEXTDRAW_STRUCT_OFFSET
            0A8D: 27@ readMem 27@ sz 1 vp 0 // READ FIRST BYTE - SECURITY_CHECK
            IF 27@ > 0
            THEN 0A8D: 30@ readMem 31@ sz 4 vp 0
            ELSE 30@ = 0
            END
        END
      
        IF 17@ == 3 // 0.3.DL
        THEN  
            0A8E: 31@ = 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@ += 0x20 // SAMP_PPOOL_TEXTDRAW_OFFSET
            0A8D: 31@ readMem 31@ sz 4 vp 0
            0@ *= 0x4 // TEXTDRAW_ID * 4
            005A: 31@ += 0@
            0A8E: 27@ = 31@ + 0x2400  // SAMP_TEXTDRAW_STRUCT_OFFSET
            0A8D: 27@ readMem 27@ sz 1 vp 0 // READ FIRST BYTE - SECURITY_CHECK
            IF 27@ > 0
            THEN 0A8D: 30@ readMem 31@ sz 4 vp 0
            ELSE 30@ = 0
            END
        END
      
        IF 17@ == 4 // 0.3.7 R3
        THEN
            0A8E: 31@ = 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@ += 0x20 // SAMP_PPOOL_TEXTDRAW_OFFSET
            0A8D: 31@ readMem 31@ sz 4 vp 0
            0@ *= 0x4 // TEXTDRAW_ID * 4
            005A: 31@ += 0@
            0A8E: 27@ = 31@ + 0x2400  // SAMP_TEXTDRAW_STRUCT_OFFSET
            0A8D: 27@ readMem 27@ sz 1 vp 0 // READ FIRST BYTE - SECURITY_CHECK
            IF 27@ > 0
            THEN 0A8D: 30@ readMem 31@ sz 4 vp 0
            ELSE 30@ = 0
            END
        END
      
        IF 17@ == 5 // 0.3.7 R4
        THEN
            0A8E: 31@ = 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@ += 0x20 // SAMP_PPOOL_TEXTDRAW_OFFSET
            0A8D: 31@ readMem 31@ sz 4 vp 0
            0@ *= 0x4 // TEXTDRAW_ID * 4
            005A: 31@ += 0@
            0A8E: 27@ = 31@ + 0x2400  // SAMP_TEXTDRAW_STRUCT_OFFSET
            0A8D: 27@ readMem 27@ sz 1 vp 0 // READ FIRST BYTE - SECURITY_CHECK
            IF 27@ > 0
            THEN 0A8D: 30@ readMem 31@ sz 4 vp 0
            ELSE 30@ = 0
            END
        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
            31@ += 0x3DE // SAMP_PPOOLS_OFFSET
            0A8D: 31@ readMem 31@ sz 4 vp 0
            31@ += 0x1C // SAMP_PPOOL_TEXTDRAW_OFFSET
            0A8D: 31@ readMem 31@ sz 4 vp 0
            0@ *= 0x4 // TEXTDRAW_ID * 4
            005A: 31@ += 0@
            0A8E: 27@ = 31@ + 0x2400  // SAMP_TEXTDRAW_STRUCT_OFFSET
            0A8D: 27@ readMem 27@ sz 1 vp 0 // READ FIRST BYTE - SECURITY_CHECK
            IF 27@ > 0
            THEN 0A8D: 30@ readMem 31@ sz 4 vp 0
            ELSE 30@ = 0
            END
        END
      
        IF 17@ == 7 // 0.3.7 R5
        THEN
            0A8E: 31@ = 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@ += 0x1C // SAMP_PPOOL_TEXTDRAW_OFFSET
            0A8D: 31@ readMem 31@ sz 4 vp 0
            0@ *= 0x4 // TEXTDRAW_ID * 4
            005A: 31@ += 0@
            0A8D: 30@ readMem 31@ sz 4 vp 0
        END
        IF 30@ == TRUE
        THEN
            31@ += 0x2400  // SAMP_TEXTDRAW_STRUCT_OFFSET
            0A8D: 31@ readMem 31@ sz 4 vp 0
            IF 31@ > 0
            THEN
                0A8E: 29@ = 31@ + 0x9A8 // SAMP_TEXTDRAW_MODEL_OFFSET
                0A8C: writeMem 29@ sz 4 vl 1@ vp 0
                0A8E: 28@ = 31@ + 0x9AA // SAMP_TEXTDRAW_ROTATION_X_OFFSET
                0A8C: writeMem 28@ sz 4 vl 2@ vp 0
                0A8E: 27@ = 31@ + 0x9AE // SAMP_TEXTDRAW_ROTATION_Y_OFFSET
                0A8C: writeMem 27@ sz 4 vl 3@ vp 0
                0A8E: 26@ = 31@ + 0x9B2 // SAMP_TEXTDRAW_ROTATION_Z_OFFSET
                0A8C: writeMem 26@ sz 4 vl 4@ vp 0
                0A8E: 25@ = 31@ + 0x9B6 // SAMP_TEXTDRAW_ZOOM_OFFSET
                0A8C: writeMem 25@ sz 4 vl 5@ vp 0
                0A8E: 24@ = 31@ + 0x9BA // SAMP_TEXTDRAW_VEH_COLOR_X_OFFSET
                0A8C: writeMem 24@ sz 4 vl 6@ vp 0
                0A8E: 23@ = 31@ + 0x9BC // SAMP_TEXTDRAW_VEH_COLOR_Y_OFFSET
                0A8C: writeMem 23@ sz 4 vl 7@ vp 0
            END
        END
    END
0AA3: freelib 31@
END
0AB2: 0
PHP:
:SetTextdrawStyle
{
    0AB1: @SetTextdrawStyle 2 ID 1000 Style 1
    Styles:
    1---4 - txd fonts (client)
    5 - model
    Other types may crash or not display.
}
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: 31@ = 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@ += 0x10 // SAMP_PPOOL_TEXTDRAW_OFFSET
            0A8D: 31@ readMem 31@ sz 4 vp 0
            0@ *= 0x4 // TEXTDRAW_ID * 4
            005A: 31@ += 0@
            0A8E: 27@ = 31@ + 0x2400  // SAMP_TEXTDRAW_STRUCT_OFFSET
            0A8D: 27@ readMem 27@ sz 1 vp 0 // READ FIRST BYTE - SECURITY_CHECK
            IF 27@ > 0
            THEN 0A8D: 30@ readMem 31@ sz 4 vp 0
            ELSE 30@ = 0
            END
        END
        IF 17@ == 2 // 0.3.7 R2
        THEN
            0A8E: 31@ = 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@ += 0x20 // SAMP_PPOOL_TEXTDRAW_OFFSET
            0A8D: 31@ readMem 31@ sz 4 vp 0
            0@ *= 0x4 // TEXTDRAW_ID * 4
            005A: 31@ += 0@
            0A8E: 27@ = 31@ + 0x2400  // SAMP_TEXTDRAW_STRUCT_OFFSET
            0A8D: 27@ readMem 27@ sz 1 vp 0 // READ FIRST BYTE - SECURITY_CHECK
            IF 27@ > 0
            THEN 0A8D: 30@ readMem 31@ sz 4 vp 0
            ELSE 30@ = 0
            END
        END
      
        IF 17@ == 3 // 0.3.DL
        THEN  
            0A8E: 31@ = 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@ += 0x20 // SAMP_PPOOL_TEXTDRAW_OFFSET
            0A8D: 31@ readMem 31@ sz 4 vp 0
            0@ *= 0x4 // TEXTDRAW_ID * 4
            005A: 31@ += 0@
            0A8E: 27@ = 31@ + 0x2400  // SAMP_TEXTDRAW_STRUCT_OFFSET
            0A8D: 27@ readMem 27@ sz 1 vp 0 // READ FIRST BYTE - SECURITY_CHECK
            IF 27@ > 0
            THEN 0A8D: 30@ readMem 31@ sz 4 vp 0
            ELSE 30@ = 0
            END
        END
      
        IF 17@ == 4 // 0.3.7 R3
        THEN
            0A8E: 31@ = 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@ += 0x20 // SAMP_PPOOL_TEXTDRAW_OFFSET
            0A8D: 31@ readMem 31@ sz 4 vp 0
            0@ *= 0x4 // TEXTDRAW_ID * 4
            005A: 31@ += 0@
            0A8E: 27@ = 31@ + 0x2400  // SAMP_TEXTDRAW_STRUCT_OFFSET
            0A8D: 27@ readMem 27@ sz 1 vp 0 // READ FIRST BYTE - SECURITY_CHECK
            IF 27@ > 0
            THEN 0A8D: 30@ readMem 31@ sz 4 vp 0
            ELSE 30@ = 0
            END
        END
      
        IF 17@ == 5 // 0.3.7 R4
        THEN
            0A8E: 31@ = 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@ += 0x20 // SAMP_PPOOL_TEXTDRAW_OFFSET
            0A8D: 31@ readMem 31@ sz 4 vp 0
            0@ *= 0x4 // TEXTDRAW_ID * 4
            005A: 31@ += 0@
            0A8E: 27@ = 31@ + 0x2400  // SAMP_TEXTDRAW_STRUCT_OFFSET
            0A8D: 27@ readMem 27@ sz 1 vp 0 // READ FIRST BYTE - SECURITY_CHECK
            IF 27@ > 0
            THEN 0A8D: 30@ readMem 31@ sz 4 vp 0
            ELSE 30@ = 0
            END
        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
            31@ += 0x3DE // SAMP_PPOOLS_OFFSET
            0A8D: 31@ readMem 31@ sz 4 vp 0
            31@ += 0x1C // SAMP_PPOOL_TEXTDRAW_OFFSET
            0A8D: 31@ readMem 31@ sz 4 vp 0
            0@ *= 0x4 // TEXTDRAW_ID * 4
            005A: 31@ += 0@
            0A8E: 27@ = 31@ + 0x2400  // SAMP_TEXTDRAW_STRUCT_OFFSET
            0A8D: 27@ readMem 27@ sz 1 vp 0 // READ FIRST BYTE - SECURITY_CHECK
            IF 27@ > 0
            THEN 0A8D: 30@ readMem 31@ sz 4 vp 0
            ELSE 30@ = 0
            END
        END
      
        IF 17@ == 7 // 0.3.7 R5
        THEN
            0A8E: 31@ = 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@ += 0x1C // SAMP_PPOOL_TEXTDRAW_OFFSET
            0A8D: 31@ readMem 31@ sz 4 vp 0
            0@ *= 0x4 // TEXTDRAW_ID * 4
            005A: 31@ += 0@
            0A8D: 30@ readMem 31@ sz 4 vp 0
        END
        IF 30@ == TRUE
        THEN
            31@ += 0x2400  // SAMP_TEXTDRAW_STRUCT_OFFSET
            0A8D: 31@ readMem 31@ sz 4 vp 0
            IF 31@ > 0
            THEN
                0A8E: 29@ = 31@ + 0x987 // SAMP_TEXTDRAW_STYLE_OFFSET
                0A8C: writeMem 29@ sz 1 vl 1@ vp 0
            END
        END
    END
0AA3: freelib 31@
END
0AB2: 0
 

Attachments

  • admins.png
    admins.png
    505.4 KB · Views: 68
Last edited:

Parazitas

God
Staff member
Joined
Jan 2, 2017
Messages
3,315
Solutions
7
Reaction score
935
Location
Lithuania
PHP:
########################## Dialog styles ##########################
DIALOG_STYLE_MSGBOX                  := 0
DIALOG_STYLE_INPUT                   := 1
DIALOG_STYLE_LIST                    := 2
DIALOG_STYLE_PASSWORD                := 3
DIALOG_STYLE_TABLIST                 := 4
DIALOG_STYLE_TABLIST_HEADERS         := 5

PHP:
:ShowDialog
{
    0AC8: 0@ = allocate_memory_size 1024
    0AD3: 0@ = format "This is my caption"
    0AC8: 1@ = allocate_memory_size 1024
    0AD3: 1@ = format "My dialog text"
    0AC8: 2@ = allocate_memory_size 1024
    0AD3: 2@ = format "Confirm"
    0AC8: 3@ = allocate_memory_size 1024
    0AD3: 3@ = format "Close"
    0AB1: @ShowDialog 6 id 1000 caption 0@ text 1@ button_1 2@ button_2 3@ style 2
}
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@ + 0x21A0B8 // SAMP_DIALOG_INFO_OFFSET
            0A8D: 30@ = readMem 30@ sz 4 vp 1
            0A8E: 29@ = 31@ + 0x6B9C0 //SAMP_DIALOG_SHOW
        END
        IF 17@ == 2 // 0.3.7 R2
        THEN
            0A8E: 30@ = 31@ + 0x21A0C0 // SAMP_DIALOG_INFO_OFFSET
            0A8D: 30@ = readMem 30@ sz 4 vp 1
            0A8E: 29@ = 31@ + 0x6BA70 //SAMP_DIALOG_SHOW
        END
     
        IF 17@ == 3 // 0.3.DL
        THEN
            0A8E: 30@ = 31@ + 0x2AC9E0 // SAMP_DIALOG_INFO_OFFSET
            0A8D: 30@ = readMem 30@ sz 4 vp 1
            0A8E: 29@ = 31@ + 0x6FA50 // SAMP_SHOW_DIALOG_OFFSET
        END
     
        IF 17@ == 4 // 0.3.7 R3
        THEN
            0A8E: 30@ = 31@ + 0x26E898 // SAMP_DIALOG_INFO_OFFSET
            0A8D: 30@ = readMem 30@ sz 4 vp 1
            0A8E: 29@ = 31@ + 0x6F8C0 // SAMP_SHOW_DIALOG_OFFSET
        END
     
        IF 17@ == 5 // 0.3.7 R4
        THEN
            0A8E: 30@ = 31@ + 0x26E9C8 // SAMP_DIALOG_INFO_OFFSET
            0A8D: 30@ = readMem 30@ sz 4 vp 1
            0A8E: 29@ = 31@ + 0x6FFE0 // SAMP_SHOW_DIALOG_OFFSET
        END
     
        IF 17@ == 6 // 0.3.7 R4 - v2
        THEN
            0A8E: 30@ = 31@ + 0x26E9C8 // SAMP_DIALOG_INFO_OFFSET
            0A8D: 30@ = readMem 30@ sz 4 vp 1
            0A8E: 29@ = 31@ + 0x70010 // SAMP_SHOW_DIALOG_OFFSET
        END
     
        IF 17@ == 7 // 0.3.7 R5
        THEN
            0A8E: 30@ = 31@ + 0x26EB50 // SAMP_DIALOG_INFO_OFFSET
            0A8D: 30@ = readMem 30@ sz 4 vp 1
            0A8E: 29@ = 31@ + 0x6FFB0 // SAMP_SHOW_DIALOG_OFFSET
        END
        0AA6: call_method 29@ struct 30@ num_params 7 pop 0 params 0 RightButton 4@ LeftButton 3@ dText 2@ Caption 1@ dType 5@ dID 0@ bServerside 0 _retVal 6@
    END
0AA3: freelib 31@
END
0AB2: 0
 
Last edited:

Parazitas

God
Staff member
Joined
Jan 2, 2017
Messages
3,315
Solutions
7
Reaction score
935
Location
Lithuania
PHP:
:isDialogResponded
{
    IF 0AB1: @isDialogResponded 0 _Returned: id 0@ button 1@ list_item 2@ input_text 3@
}
IF 0AA2: 31@ = "samp.dll"
THEN 
    CONST
    VAR1 = $2AFD
    VAR2 = $2BEC
    VAR3 = $2CDE
    VAR4 = $2DCB
    END
   
    0AB1: @get_samp_version_id 0 _returned: ID 17@
    IF 17@ > 0
    THEN
        IF 17@ == 1 // 0.3.7 R1
        THEN
            0A8E: 30@ = 31@ + 0x21A0B8 // SAMP_DIALOG_INFO_OFFSET
            0A8D: 30@ = read_memory 30@ size 4 virtual_protect 0
           
            0A8E: 29@ = 30@ + 0x20 // SAMP_DIALOG_LIST_BOX_OFFSET
            0A8D: 29@ = read_memory 29@ size 4 virtual_protect 0
           
            0A8E: 28@ = 30@ + 0x24 // SAMP_DIALOG_EDIT_BOX_OFFSET
            0A8D: 28@ = read_memory 28@ size 4 virtual_protect 0
              
            0A8E: 27@ = 30@ + 0x30 // SAMP_DIALOG_ID_OFFSET
            0A8D: 27@ = read_memory 27@ size 4 virtual_protect 0
           
            0A8E: VAR2 = 31@ + 0x6C04D // SAMP_DIALOG_RESPONSE_OFFSET + 0xD
           
            0A8E: 26@ = 31@ + 0x84850 // SAMP_GET_DIALOG_LIST_ITEM_OFFSET
            0AA8: call_function_method 26@ struct 29@ num_params 1 pop 0 -1 _Return: 25@
           
            0A8E: 24@ = 31@ + 0x81030 // SAMP_GET_DIALOG_EDIT_BOX_TEXT_OFFSET
            0AA8: call_function_method 24@ struct 28@ num_params 0 pop 0 _Returned: Input Text 23@
        END
        IF 17@ == 2 // 0.3.7 R2
        THEN
            0A8E: 30@ = 31@ + 0x21A0C0 // SAMP_DIALOG_INFO_OFFSET
            0A8D: 30@ = read_memory 30@ size 4 virtual_protect 0
           
            0A8E: 29@ = 30@ + 0x20 // SAMP_DIALOG_LIST_BOX_OFFSET
            0A8D: 29@ = read_memory 29@ size 4 virtual_protect 0
           
            0A8E: 28@ = 30@ + 0x24 // SAMP_DIALOG_EDIT_BOX_OFFSET
            0A8D: 28@ = read_memory 28@ size 4 virtual_protect 0
              
            0A8E: 27@ = 30@ + 0x30 // SAMP_DIALOG_ID_OFFSET
            0A8D: 27@ = read_memory 27@ size 4 virtual_protect 0
           
            0A8E: VAR2 = 31@ + 0x6C0FD // SAMP_DIALOG_RESPONSE_OFFSET + 0xD
           
            0A8E: 26@ = 31@ + 0x848F0 // SAMP_GET_DIALOG_LIST_ITEM_OFFSET
            0AA8: call_function_method 26@ struct 29@ num_params 1 pop 0 -1 _Return: 25@
           
            0A8E: 24@ = 31@ + 0x810D0 // SAMP_GET_DIALOG_EDIT_BOX_TEXT_OFFSET
            0AA8: call_function_method 24@ struct 28@ num_params 0 pop 0 _Returned: Input Text 23@
        END
      
        IF 17@ == 3 // 0.3.DL
        THEN
            0A8E: 30@ = 31@ + 0x21A0C0 // SAMP_DIALOG_INFO_OFFSET
            0A8D: 30@ = read_memory 30@ size 4 virtual_protect 0
           
            0A8E: 29@ = 30@ + 0x20 // SAMP_DIALOG_LIST_BOX_OFFSET
            0A8D: 29@ = read_memory 29@ size 4 virtual_protect 0
           
            0A8E: 28@ = 30@ + 0x24 // SAMP_DIALOG_EDIT_BOX_OFFSET
            0A8D: 28@ = read_memory 28@ size 4 virtual_protect 0
              
            0A8E: 27@ = 30@ + 0x30 // SAMP_DIALOG_ID_OFFSET
            0A8D: 27@ = read_memory 27@ size 4 virtual_protect 0
           
            0A8E: VAR2 = 31@ + 0x700DD // SAMP_DIALOG_RESPONSE_OFFSET + 0xD
           
            0A8E: 26@ = 31@ + 0x888F0 // SAMP_GET_DIALOG_LIST_ITEM_OFFSET
            0AA8: call_function_method 26@ struct 29@ num_params 1 pop 0 -1 _Return: 25@
           
            0A8E: 24@ = 31@ + 0x850D0 // SAMP_GET_DIALOG_EDIT_BOX_TEXT_OFFSET
            0AA8: call_function_method 24@ struct 28@ num_params 0 pop 0 _Returned: Input Text 23@
        END
      
        IF 17@ == 4 // 0.3.7 R3
        THEN
            0A8E: 30@ = 31@ + 0x26E898 // SAMP_DIALOG_INFO_OFFSET
            0A8D: 30@ = read_memory 30@ size 4 virtual_protect 0
           
            0A8E: 29@ = 30@ + 0x20 // SAMP_DIALOG_LIST_BOX_OFFSET
            0A8D: 29@ = read_memory 29@ size 4 virtual_protect 0
           
            0A8E: 28@ = 30@ + 0x24 // SAMP_DIALOG_EDIT_BOX_OFFSET
            0A8D: 28@ = read_memory 28@ size 4 virtual_protect 0
              
            0A8E: 27@ = 30@ + 0x30 // SAMP_DIALOG_ID_OFFSET
            0A8D: 27@ = read_memory 27@ size 4 virtual_protect 0
           
            0A8E: VAR2 = 31@ + 0x6FF4D // SAMP_DIALOG_RESPONSE_OFFSET + 0xD
           
            0A8E: 26@ = 31@ + 0x88760 // SAMP_GET_DIALOG_LIST_ITEM_OFFSET
            0AA8: call_function_method 26@ struct 29@ num_params 1 pop 0 -1 _Return: 25@
           
            0A8E: 24@ = 31@ + 0x84F40 // SAMP_GET_DIALOG_EDIT_BOX_TEXT_OFFSET
            0AA8: call_function_method 24@ struct 28@ num_params 0 pop 0 _Returned: Input Text 23@
        END
      
        IF 17@ == 5 // 0.3.7 R4
        THEN
            0A8E: 30@ = 31@ + 0x26E9C8 // SAMP_DIALOG_INFO_OFFSET
            0A8D: 30@ = read_memory 30@ size 4 virtual_protect 0
           
            0A8E: 29@ = 30@ + 0x20 // SAMP_DIALOG_LIST_BOX_OFFSET
            0A8D: 29@ = read_memory 29@ size 4 virtual_protect 0
           
            0A8E: 28@ = 30@ + 0x24 // SAMP_DIALOG_EDIT_BOX_OFFSET
            0A8D: 28@ = read_memory 28@ size 4 virtual_protect 0
              
            0A8E: 27@ = 30@ + 0x30 // SAMP_DIALOG_ID_OFFSET
            0A8D: 27@ = read_memory 27@ size 4 virtual_protect 0
           
            0A8E: VAR2 = 31@ + 0x7066D // SAMP_DIALOG_RESPONSE_OFFSET + 0xD
           
            0A8E: 26@ = 31@ + 0x88EA0 // SAMP_GET_DIALOG_LIST_ITEM_OFFSET
            0AA8: call_function_method 26@ struct 29@ num_params 1 pop 0 -1 _Return: 25@
           
            0A8E: 24@ = 31@ + 0x85680 // SAMP_GET_DIALOG_EDIT_BOX_TEXT_OFFSET
            0AA8: call_function_method 24@ struct 28@ num_params 0 pop 0 _Returned: Input Text 23@
        END
      
        IF 17@ == 6 // 0.3.7 R4 - v2
        THEN
            0A8E: 30@ = 31@ + 0x26E9C8 // SAMP_DIALOG_INFO_OFFSET
            0A8D: 30@ = read_memory 30@ size 4 virtual_protect 0
           
            0A8E: 29@ = 30@ + 0x20 // SAMP_DIALOG_LIST_BOX_OFFSET
            0A8D: 29@ = read_memory 29@ size 4 virtual_protect 0
           
            0A8E: 28@ = 30@ + 0x24 // SAMP_DIALOG_EDIT_BOX_OFFSET
            0A8D: 28@ = read_memory 28@ size 4 virtual_protect 0
              
            0A8E: 27@ = 30@ + 0x30 // SAMP_DIALOG_ID_OFFSET
            0A8D: 27@ = read_memory 27@ size 4 virtual_protect 0
           
            0A8E: VAR2 = 31@ + 0x7069D // SAMP_DIALOG_RESPONSE_OFFSET + 0xD
           
            0A8E: 26@ = 31@ + 0x88ED0 // SAMP_GET_DIALOG_LIST_ITEM_OFFSET
            0AA8: call_function_method 26@ struct 29@ num_params 1 pop 0 -1 _Return: 25@
           
            0A8E: 24@ = 31@ + 0x856B0 // SAMP_GET_DIALOG_EDIT_BOX_TEXT_OFFSET
            0AA8: call_function_method 24@ struct 28@ num_params 0 pop 0 _Returned: Input Text 23@
        END
      
        IF 17@ == 7 // 0.3.7 R5
        THEN
            0A8E: 30@ = 31@ + 0x26EB50 // SAMP_DIALOG_INFO_OFFSET
            0A8D: 30@ = read_memory 30@ size 4 virtual_protect 0
           
            0A8E: 29@ = 30@ + 0x20 // SAMP_DIALOG_LIST_BOX_OFFSET
            0A8D: 29@ = read_memory 29@ size 4 virtual_protect 0
           
            0A8E: 28@ = 30@ + 0x24 // SAMP_DIALOG_EDIT_BOX_OFFSET
            0A8D: 28@ = read_memory 28@ size 4 virtual_protect 0
              
            0A8E: 27@ = 30@ + 0x30 // SAMP_DIALOG_ID_OFFSET
            0A8D: 27@ = read_memory 27@ size 4 virtual_protect 0
           
            0A8E: VAR2 = 31@ + 0x7063D // SAMP_DIALOG_RESPONSE_OFFSET + 0xD
           
            0A8E: 26@ = 31@ + 0x88E70 // SAMP_GET_DIALOG_LIST_ITEM_OFFSET
            0AA8: call_function_method 26@ struct 29@ num_params 1 pop 0 -1 _Return: 25@
           
            0A8E: 24@ = 31@ + 0x85650 //SAMP_GET_DIALOG_EDIT_BOX_TEXT_OFFSET
            0AA8: call_function_method 24@ struct 28@ num_params 0 pop 0 _Returned: Input Text 23@
        END
  
        // Hook_RPC_DIALOGRESPONSE
        0AC8: VAR1 = allocate_memory_size 17
        0A8C: write_memory VAR1 size 4 value 0x08458B50 virtual_protect 1
        VAR1 += 4
        0A8C: write_memory VAR1 size 1 value 0xA3 virtual_protect 1
        VAR1 += 1
        0A8C: write_memory VAR1 size 4 value 0x00000000 virtual_protect 1
        VAR1 += 4
        0A8C: write_memory VAR1 size 2 value 0x6458 virtual_protect 1
        VAR1 += 2
        0A8C: write_memory VAR1 size 1 value 0xA1 virtual_protect 1
        VAR1 += 1
        0A8C: write_memory VAR1 size 4 value 0x00000000 virtual_protect 1
        VAR1 += 4
        0A8C: write_memory VAR1 size 1 value 0xC3 virtual_protect 1
        VAR1 -= 16
       
        VAR1 += 0x5
   
        0AC7: VAR4 = var VAR3 offset
        0A8C: write_memory VAR1 size 4 value VAR4 virtual_protect 1
        VAR1 -= 0x5
        // asm_call_hook
        0A8C: write_memory VAR2 size 1 value 0xE8 virtual_protect 1
        0062: VAR1 -= VAR2 // (int)
        000E: VAR1 -= 5
        VAR2 += 1
        0A8C: write_memory VAR2 size 4 value VAR1 virtual_protect 1
        //
        VAR2 += 0x4
        0A8C: write_memory VAR2 size 1 value 0x90 virtual_protect 1 // NOP
        // END
        IF OR
        27@ > -1
        VAR3 > -1
        25@ > -1
        23@ > 0
        THEN
            IF VAR3 == 1
            THEN
                22@ = 1 // LEFT_BUTTON_WAS_CLICKED 
                VAR3 = -1
            ELSE
                IF VAR3 == 0
                THEN
                    22@ = 0 // RIGHT_BUTTON_WAS_CLICKED
                    VAR3 = -1
                ELSE
                    22@ = -1  // RESET_CLICKED_BUTTONS
                    VAR3 = -1
                END
            END
            0485:  return_true
        ELSE 059A:  return_false
        END
    END
0AA3: freelib 31@
END
0AB2: ret 4 27@ 22@ 25@ 23@
 
Last edited:

Parazitas

God
Staff member
Joined
Jan 2, 2017
Messages
3,315
Solutions
7
Reaction score
935
Location
Lithuania
Check When chat was updated to know exactly when new chat messages appeared , so you don't need to constantly read chat which will save some fps...
PHP:
:IsChatUpdated
{
    IF 0AB1: @IsChatUpdated 0
}
IF 0AA2: 31@ = "samp.dll" // IF and SET
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@ + 0x21A0E4 // SAMP_CHAT_INFO_OFFSET
            0A8D: 30@ = readMem 30@ sz 4 vp 1
            0A8E: 29@ = 30@ + 0x63D3 // SAMP_CHAT_INFO_OFFSET      
            0A8D: 28@ = readMem 29@ sz 1 vp 1
        END
        IF 17@ == 2 // 0.3.7 R2
        THEN
            0A8E: 30@ = 31@ + 0x21A0EC // SAMP_CHAT_INFO_OFFSET
            0A8D: 30@ = readMem 30@ sz 4 vp 1
            0A8E: 29@ = 30@ + 0x63D3 // SAMP_CHAT_INFO_OFFSET      
            0A8D: 28@ = readMem 29@ sz 1 vp 1
        END
      
        IF 17@ == 3 // 0.3.DL
        THEN
            0A8E: 30@ = 31@ + 0x2ACA10 // SAMP_CHAT_INFO_OFFSET
            0A8D: 30@ = readMem 30@ sz 4 vp 1
            0A8E: 29@ = 30@ + 0x63D3 // SAMP_CHAT_INFO_OFFSET      
            0A8D: 28@ = readMem 29@ sz 1 vp 1
        END
      
        IF 17@ == 4 // 0.3.7 R3
        THEN
            0A8E: 30@ = 31@ + 0x26E8C8 // SAMP_CHAT_INFO_OFFSET
            0A8D: 30@ = readMem 30@ sz 4 vp 1
            0A8E: 29@ = 30@ + 0x63D3 // SAMP_CHAT_INFO_OFFSET      
            0A8D: 28@ = readMem 29@ sz 1 vp 1
        END
      
        IF 17@ == 5 // 0.3.7 R4
        THEN
            0A8E: 30@ = 31@ + 0x26E9F8 // SAMP_CHAT_INFO_OFFSET
            0A8D: 30@ = readMem 30@ sz 4 vp 1
            0A8E: 29@ = 30@ + 0x63D3 // SAMP_CHAT_INFO_OFFSET      
            0A8D: 28@ = readMem 29@ sz 1 vp 1
        END
      
        IF 17@ == 6 // 0.3.7 R4 - v2
        THEN
            0A8E: 30@ = 31@ + 0x26E9F8 // SAMP_CHAT_INFO_OFFSET
            0A8D: 30@ = readMem 30@ sz 4 vp 1
            0A8E: 29@ = 30@ + 0x63D3 // SAMP_CHAT_INFO_OFFSET      
            0A8D: 28@ = readMem 29@ sz 1 vp 1
        END
      
        IF 17@ == 7 // 0.3.7 R5
        THEN
            0A8E: 30@ = 31@ + 0x26EB80 // SAMP_CHAT_INFO_OFFSET
            0A8D: 30@ = readMem 30@ sz 4 vp 1
            0A8E: 29@ = 30@ + 0x63D3 // SAMP_CHAT_INFO_OFFSET      
            0A8D: 28@ = readMem 29@ sz 1 vp 1
        END
        IF 28@ > 0
        THEN
            0485:  return_true
            0A8C: writeMem 29@ sz 1 vl 0 vp 1
        ELSE 059A:  return_false
        END                                                                              
    END
0AA3: freelib 31@
END
0AB2: ret 0

Get Chat String By Chat ID
PHP:
:getChatString
{
    0AC8: 0@ = allocate_memory_size 144
    0AC8: 1@ = allocate_memory_size 144
    0AB1: @getChatString 1 ChatID 99 _Returned: Text 0@ PrefixText 1@ Color 2@ PrefixColor 3@
    // do something...
    0AC9: free_allocated_memory 0@
    0AC9: free_allocated_memory 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
            31@ += 0x21A0E4 // SAMP_CHAT_INFO_OFFSET
            0A8D: 31@ readMem 31@ sz 4 vp 0
            31@ += 0x132
            0@ *= 0xFC
            005A: 31@ += 0@
            0A8E: 30@ = 31@ + 0x20 // CHAT_TEXT_OFFSET
            0A8E: 29@ = 31@ + 0x4 // CHAT_PREFIX_TEXT_OFFSET
            0A8E: 28@ = 31@ + 0xF4 // CHAT_COLOR_OFFSET
            0A8D: 27@ readMem 28@ sz 4 vp 0 // HEX Color
            0A8E: 26@ = 31@ + 0xF8 // CHAT_PREFIX_COLOR_OFFSET
            0A8D: 25@ readMem 26@ sz 1 vp 0
            IF NOT 25@ > 0
            THEN 24@ = 0
            ELSE 0A8D: 24@ readMem 26@ sz 4 vp 0
            END
        END
        IF 17@ == 2 // 0.3.7 R2
        THEN
            31@ += 0x21A0EC // SAMP_CHAT_INFO_OFFSET
            0A8D: 31@ readMem 31@ sz 4 vp 0
            31@ += 0x132
            0@ *= 0xFC
            005A: 31@ += 0@
            0A8E: 30@ = 31@ + 0x20 // CHAT_TEXT_OFFSET
            0A8E: 29@ = 31@ + 0x4 // CHAT_PREFIX_TEXT_OFFSET
            0A8E: 28@ = 31@ + 0xF4 // CHAT_COLOR_OFFSET
            0A8D: 27@ readMem 28@ sz 4 vp 0 // HEX Color
            0A8E: 26@ = 31@ + 0xF8 // CHAT_PREFIX_COLOR_OFFSET
            0A8D: 25@ readMem 26@ sz 1 vp 0
            IF NOT 25@ > 0
            THEN 24@ = 0
            ELSE 0A8D: 24@ readMem 26@ sz 4 vp 0
            END
        END
      
        IF 17@ == 3 // 0.3.DL
        THEN
            31@ += 0x2ACA10 // SAMP_CHAT_INFO_OFFSET
            0A8D: 31@ readMem 31@ sz 4 vp 0
            31@ += 0x132
            0@ *= 0xFC
            005A: 31@ += 0@
            0A8E: 30@ = 31@ + 0x20 // CHAT_TEXT_OFFSET
            0A8E: 29@ = 31@ + 0x4 // CHAT_PREFIX_TEXT_OFFSET
            0A8E: 28@ = 31@ + 0xF4 // CHAT_COLOR_OFFSET
            0A8D: 27@ readMem 28@ sz 4 vp 0 // HEX Color
            0A8E: 26@ = 31@ + 0xF8 // CHAT_PREFIX_COLOR_OFFSET
            0A8D: 25@ readMem 26@ sz 1 vp 0
            IF NOT 25@ > 0
            THEN 24@ = 0
            ELSE 0A8D: 24@ readMem 26@ sz 4 vp 0
            END
        END
      
        IF 17@ == 4 // 0.3.7 R3
        THEN
            31@ += 0x26E8C8 // SAMP_CHAT_INFO_OFFSET
            0A8D: 31@ readMem 31@ sz 4 vp 0
            31@ += 0x132
            0@ *= 0xFC
            005A: 31@ += 0@
            0A8E: 30@ = 31@ + 0x20 // CHAT_TEXT_OFFSET
            0A8E: 29@ = 31@ + 0x4 // CHAT_PREFIX_TEXT_OFFSET
            0A8E: 28@ = 31@ + 0xF4 // CHAT_COLOR_OFFSET
            0A8D: 27@ readMem 28@ sz 4 vp 0 // HEX Color
            0A8E: 26@ = 31@ + 0xF8 // CHAT_PREFIX_COLOR_OFFSET
            0A8D: 25@ readMem 26@ sz 1 vp 0
            IF NOT 25@ > 0
            THEN 24@ = 0
            ELSE 0A8D: 24@ readMem 26@ sz 4 vp 0
            END
        END
      
        IF 17@ == 5 // 0.3.7 R4
        THEN
            31@ += 0x26E9F8 // SAMP_CHAT_INFO_OFFSET
            0A8D: 31@ readMem 31@ sz 4 vp 0
            31@ += 0x132
            0@ *= 0xFC
            005A: 31@ += 0@
            0A8E: 30@ = 31@ + 0x20 // CHAT_TEXT_OFFSET
            0A8E: 29@ = 31@ + 0x4 // CHAT_PREFIX_TEXT_OFFSET
            0A8E: 28@ = 31@ + 0xF4 // CHAT_COLOR_OFFSET
            0A8D: 27@ readMem 28@ sz 4 vp 0 // HEX Color
            0A8E: 26@ = 31@ + 0xF8 // CHAT_PREFIX_COLOR_OFFSET
            0A8D: 25@ readMem 26@ sz 1 vp 0
            IF NOT 25@ > 0
            THEN 24@ = 0
            ELSE 0A8D: 24@ readMem 26@ sz 4 vp 0
            END
        END
      
        IF 17@ == 6 // 0.3.7 R4 - v2
        THEN
            31@ += 0x26E9F8 // SAMP_CHAT_INFO_OFFSET
            0A8D: 31@ readMem 31@ sz 4 vp 0
            31@ += 0x132
            0@ *= 0xFC
            005A: 31@ += 0@
            0A8E: 30@ = 31@ + 0x20 // CHAT_TEXT_OFFSET
            0A8E: 29@ = 31@ + 0x4 // CHAT_PREFIX_TEXT_OFFSET
            0A8E: 28@ = 31@ + 0xF4 // CHAT_COLOR_OFFSET
            0A8D: 27@ readMem 28@ sz 4 vp 0 // HEX Color
            0A8E: 26@ = 31@ + 0xF8 // CHAT_PREFIX_COLOR_OFFSET
            0A8D: 25@ readMem 26@ sz 1 vp 0
            IF NOT 25@ > 0
            THEN 24@ = 0
            ELSE 0A8D: 24@ readMem 26@ sz 4 vp 0
            END
        END
      
        IF 17@ == 7 // 0.3.7 R5
        THEN
            31@ += 0x26EB80 // SAMP_CHAT_INFO_OFFSET
            0A8D: 31@ readMem 31@ sz 4 vp 0
            31@ += 0x132
            0@ *= 0xFC
            005A: 31@ += 0@
            0A8E: 30@ = 31@ + 0x20 // CHAT_TEXT_OFFSET
            0A8E: 29@ = 31@ + 0x4 // CHAT_PREFIX_TEXT_OFFSET
            0A8E: 28@ = 31@ + 0xF4 // CHAT_COLOR_OFFSET
            0A8D: 27@ readMem 28@ sz 4 vp 0 // HEX Color
            0A8E: 26@ = 31@ + 0xF8 // CHAT_PREFIX_COLOR_OFFSET
            0A8D: 25@ readMem 26@ sz 1 vp 0
            IF NOT 25@ > 0
            THEN 24@ = 0
            ELSE 0A8D: 24@ readMem 26@ sz 4 vp 0
            END
        END
    END
0AA3: freelib 31@
END
0AB2: ret 4 30@ 29@ 27@ 24@
 
Last edited:

Parazitas

God
Staff member
Joined
Jan 2, 2017
Messages
3,315
Solutions
7
Reaction score
935
Location
Lithuania
PHP:
:MuteServerChat
{
    0AB1: @MuteServerChat 1 State TRUE
}
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@ + 0xC050 // SAMP_NOP_CHAT_UPDATE_OFFSET
            0A8E: 29@ = 31@ + 0x64300 // SAMP_CHAT_UPDATE_OFFSET
        END
        IF 17@ == 2 // 0.3.7 R2
        THEN
            0A8E: 30@ = 31@ + 0xC050 // SAMP_CHAT_UPDATE_OFFSET
            0A8E: 29@ = 31@ + 0x643D0 // SAMP_CHAT_UPDATE_OFFSET
        END
      
        IF 17@ == 3 // 0.3.DL
        THEN
            0A8E: 30@ = 31@ + 0xEE60 // SAMP_NOP_CHAT_UPDATE_OFFSET
            0A8E: 29@ = 31@ + 0x67940 // SAMP_CHAT_UPDATE_OFFSET
        END
      
        IF 17@ == 4 // 0.3.7 R3
        THEN
            0A8E: 30@ = 31@ + 0xEC50 // SAMP_NOP_CHAT_UPDATE_OFFSET
            0A8E: 29@ = 31@ + 0x67750 // SAMP_CHAT_UPDATE_OFFSET
        END
      
        IF 17@ == 5 // 0.3.7 R4
        THEN
            0A8E: 30@ = 31@ + 0xEF60 // SAMP_NOP_CHAT_UPDATE_OFFSET
            0A8E: 29@ = 31@ + 0x67E90 // SAMP_CHAT_UPDATE_OFFSET
        END
      
        IF 17@ == 6 // 0.3.7 R4 - v2
        THEN
            0A8E: 30@ = 31@ + 0xEF90 // SAMP_NOP_CHAT_UPDATE_OFFSET
            0A8E: 29@ = 31@ + 0x67ED0 // SAMP_CHAT_UPDATE_OFFSET
        END

        IF 17@ == 7 // 0.3.7 R5
        THEN
            0A8E: 30@ = 31@ + 0xEF90 // SAMP_NOP_CHAT_UPDATE_OFFSET
            0A8E: 29@ = 31@ + 0x67ED0 // SAMP_CHAT_UPDATE_OFFSET
        END
      
        IF 0@ == TRUE
        THEN
            0A8C: write_memory 30@ size 1 value 0xC3 virtual_protect 1
            0A8C: write_memory 29@ size 1 value 0xC3 virtual_protect 1
        ELSE
            0A8C: write_memory 30@ size 1 value 0x55 virtual_protect 1
            0A8C: write_memory 29@ size 1 value 0x56 virtual_protect 1
        END
    END
0AA3: freelib 31@
END
0AB2: 0
 
Last edited:

Parazitas

God
Staff member
Joined
Jan 2, 2017
Messages
3,315
Solutions
7
Reaction score
935
Location
Lithuania
PHP:
:GetLocalPlayerColor
{
    0AB1: @GetLocalPlayerColor 0 _Returned: color 31@
}
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: 29@ = 31@ + 0x3D90 // SAMP_GET_LOCAL_PLAYER_COLOR_OFFSET
        END
        IF 17@ == 2 // 0.3.7 R2
        THEN
            0A8E: 29@ = 31@ + 0x3DA0 // SAMP_GET_LOCAL_PLAYER_COLOR_OFFSET
        END
      
        IF 17@ == 3 // 0.3.DL
        THEN
            0A8E: 29@ = 31@ + 0x3E20 // SAMP_GET_LOCAL_PLAYER_COLOR_OFFSET
        END
      
        IF 17@ == 4 // 0.3.7 R3
        THEN
            0A8E: 29@ = 31@ + 0x3DA0 // SAMP_GET_LOCAL_PLAYER_COLOR_OFFSET
        END
      
        IF 17@ == 5 // 0.3.7 R4
        THEN
            0A8E: 29@ = 31@ + 0x3F10 // SAMP_GET_LOCAL_PLAYER_COLOR_OFFSET
        END
      
        IF 17@ == 6 // 0.3.7 R4 - v2
        THEN
            0A8E: 29@ = 31@ + 0x3F20 // SAMP_GET_LOCAL_PLAYER_COLOR_OFFSET
        END
      
        IF 17@ == 7 // 0.3.7 R5
        THEN
            0A8E: 29@ = 31@ + 0x3F20 // SAMP_GET_LOCAL_PLAYER_COLOR_OFFSET
        END
      
        0AA7: call_function 29@ num_params 0 pop 0 _Returned: color 28@
    END
0AA3: freelib 31@
END
0AB2: ret 1 28@
 
Last edited:

Parazitas

God
Staff member
Joined
Jan 2, 2017
Messages
3,315
Solutions
7
Reaction score
935
Location
Lithuania
PHP:
:SetLocalPlayerColor
{
    0AB1: @SetLocalPlayerColor 1 Color 31@
}
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: 29@ = 31@ + 0x3D40 // SAMP_SET_LOCAL_PLAYER_COLOR_OFFSET
        END
        IF 17@ == 2 // 0.3.7 R2
        THEN
            0A8E: 29@ = 31@ + 0x3D60 // SAMP_SET_LOCAL_PLAYER_COLOR_OFFSET
        END
      
        IF 17@ == 3 // 0.3.DL
        THEN
            0A8E: 29@ = 31@ + 0x3DE0 // SAMP_SET_LOCAL_PLAYER_COLOR_OFFSET
        END
      
        IF 17@ == 4 // 0.3.7 R3
        THEN
            0A8E: 29@ = 31@ + 0x3D50 // SAMP_SET_LOCAL_PLAYER_COLOR_OFFSET
        END
      
        IF 17@ == 5 // 0.3.7 R4
        THEN
            0A8E: 29@ = 31@ + 0x3EC0 // SAMP_SET_LOCAL_PLAYER_COLOR_OFFSET
        END
      
        IF 17@ == 6 // 0.3.7 R4 - v2
        THEN
            0A8E: 29@ = 31@ + 0x3ED0 // SAMP_SET_LOCAL_PLAYER_COLOR_OFFSET
        END
      
        IF 17@ == 7 // 0.3.7 R5
        THEN
            0A8E: 29@ = 31@ + 0x3ED0 // SAMP_SET_LOCAL_PLAYER_COLOR_OFFSET
        END
      
        0AA7: call_function 29@ num_params 1 pop 0 color 0@ rtn 28@
    END
0AA3: freelib 31@
END
0AB2: ret 0
 
Last edited:

Parazitas

God
Staff member
Joined
Jan 2, 2017
Messages
3,315
Solutions
7
Reaction score
935
Location
Lithuania
PHP:
:GetLastSentTextFromChatBox
{
    0AB1: @GetLastSentTextFromChatBox 0 _Returned: Command 0@ Text 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_OFFSET      
            0A8D: 30@ = readMem 30@ sz 4 vp 0  
            0A8E: 29@ = 30@ + 0x14E5 // SAMP_CHAT_SENT_COMMAND_OFFSET
            0A8E: 28@ = 30@ + 0x1565 // SAMP_CHAT_SENT_TEXT_OFFSET
        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  
            0A8E: 29@ = 30@ + 0x14E5 // SAMP_CHAT_SENT_COMMAND_OFFSET
            0A8E: 28@ = 30@ + 0x1565 // SAMP_CHAT_SENT_TEXT_OFFSET
        END
       
        IF 17@ == 3 // 0.3.DL
        THEN
            0A8E: 30@ = 31@ + 0x2ACA14 // SAMP_CHAT_INPUT_OFFSET      
            0A8D: 30@ = readMem 30@ sz 4 vp 0  
            0A8E: 29@ = 30@ + 0x14E5 // SAMP_CHAT_SENT_COMMAND_OFFSET
            0A8E: 28@ = 30@ + 0x1565 // SAMP_CHAT_SENT_TEXT_OFFSET
        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  
            0A8E: 29@ = 30@ + 0x14E5 // SAMP_CHAT_SENT_COMMAND_OFFSET
            0A8E: 28@ = 30@ + 0x1565 // SAMP_CHAT_SENT_TEXT_OFFSET
        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  
            0A8E: 29@ = 30@ + 0x14E5 // SAMP_CHAT_SENT_COMMAND_OFFSET
            0A8E: 28@ = 30@ + 0x1565 // SAMP_CHAT_SENT_TEXT_OFFSET
        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  
            0A8E: 29@ = 30@ + 0x14E5 // SAMP_CHAT_SENT_COMMAND_OFFSET
            0A8E: 28@ = 30@ + 0x1565 // SAMP_CHAT_SENT_TEXT_OFFSET
        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  
            0A8E: 29@ = 30@ + 0x14E5 // SAMP_CHAT_SENT_COMMAND_OFFSET
            0A8E: 28@ = 30@ + 0x1565 // SAMP_CHAT_SENT_TEXT_OFFSET
        END
    END
0AA3: freelib 31@
END
0AB2: ret 2 29@ 28@
 
Last edited:

Parazitas

God
Staff member
Joined
Jan 2, 2017
Messages
3,315
Solutions
7
Reaction score
935
Location
Lithuania
Function will return only first Column text!
If you need for other columns please visit link below:
PHP:
:get_current_dialog_list_item_text
{
    0AB1: @get_current_dialog_list_item_text 1 Item 1 _Returned: Text 0@
}
IF 0AA2: 2@ = "samp.dll"
THEN
    0AB1: @get_samp_version_id 0 _returned: ID 17@
    IF 17@ > 0
    THEN
        IF 7@ == 1 // 0.3.7 R1
        THEN
            0A8E: 3@ = 2@ + 0x21A0B8 // SAMP_DIALOG_INFO_OFFSET     
            0A8D: 3@ = readMem 3@ sz 4 vp 0 
            0A8E: 4@ = 3@ + 0x20 // SAMP_DIALOG_LIST_BOX_OFFSET            
            0A8D: 4@ = readMem 4@ sz 4 vp 0 
 
            0A8E: 5@ = 2@ + 0x86390 // SAMP_GET_DIALOG_LIST_ITEM_TEXT_OFFSET
        END
        IF 17@ == 2 // 0.3.7 R2
        THEN
            0A8E: 3@ = 2@ + 0x21A0C0 // SAMP_DIALOG_INFO_OFFSET     
            0A8D: 3@ = readMem 3@ sz 4 vp 0 
            0A8E: 4@ = 3@ + 0x20 // SAMP_DIALOG_LIST_BOX_OFFSET            
            0A8D: 4@ = readMem 4@ sz 4 vp 0 
 
            0A8E: 5@ = 2@ + 0x86430 // SAMP_GET_DIALOG_LIST_ITEM_TEXT_OFFSET
        END
      
        IF 17@ == 3 // 0.3.DL
        THEN
            0A8E: 3@ = 2@ + 0x2AC9E0 // SAMP_DIALOG_INFO_OFFSET     
            0A8D: 3@ = readMem 3@ sz 4 vp 0 
            0A8E: 4@ = 3@ + 0x20 // SAMP_DIALOG_LIST_BOX_OFFSET            
            0A8D: 4@ = readMem 4@ sz 4 vp 0 
 
            0A8E: 5@ = 2@ + 0x8A440 // SAMP_GET_DIALOG_LIST_ITEM_TEXT_OFFSET
        END
      
        IF 17@ == 4 // 0.3.7 R3
        THEN
            0A8E: 3@ = 2@ + 0x26E898 // SAMP_DIALOG_INFO_OFFSET     
            0A8D: 3@ = readMem 3@ sz 4 vp 0 
            0A8E: 4@ = 3@ + 0x20 // SAMP_DIALOG_LIST_BOX_OFFSET            
            0A8D: 4@ = readMem 4@ sz 4 vp 0 
 
            0A8E: 5@ = 2@ + 0x8A2B0 // SAMP_GET_DIALOG_LIST_ITEM_TEXT_OFFSET
        END
      
        IF 17@ == 5 // 0.3.7 R4
        THEN
            0A8E: 3@ = 2@ + 0x26E9C8 // SAMP_DIALOG_INFO_OFFSET     
            0A8D: 3@ = readMem 3@ sz 4 vp 0 
            0A8E: 4@ = 3@ + 0x20 // SAMP_DIALOG_LIST_BOX_OFFSET            
            0A8D: 4@ = readMem 4@ sz 4 vp 0 
 
            0A8E: 5@ = 2@ + 0x8A9F0 // SAMP_GET_DIALOG_LIST_ITEM_TEXT_OFFSET
        END
      
        IF 17@ == 6 // 0.3.7 R4 - v2
        THEN
            0A8E: 3@ = 2@ + 0x26E9C8 // SAMP_DIALOG_INFO_OFFSET     
            0A8D: 3@ = readMem 3@ sz 4 vp 0 
            0A8E: 4@ = 3@ + 0x20 // SAMP_DIALOG_LIST_BOX_OFFSET            
            0A8D: 4@ = readMem 4@ sz 4 vp 0 
 
            0A8E: 5@ = 2@ + 0x8AA20 // SAMP_GET_DIALOG_LIST_ITEM_TEXT_OFFSET
        END

        IF 17@ == 7 // 0.3.7 R5
        THEN
            0A8E: 3@ = 2@ + 0x26EB50 // SAMP_DIALOG_INFO_OFFSET     
            0A8D: 3@ = readMem 3@ sz 4 vp 0 
            0A8E: 4@ = 3@ + 0x20 // SAMP_DIALOG_LIST_BOX_OFFSET            
            0A8D: 4@ = readMem 4@ sz 4 vp 0 
 
            0A8E: 5@ = 2@ + 0x8A9C0 // SAMP_GET_DIALOG_LIST_ITEM_TEXT_OFFSET
        END
 
        0AA8: call_function_method 5@ struct 4@ num_params 1 pop 0 Item 0@ _Returned:  text 31@
    END
0AA3: freelib 31@
END
0AB2: 1 31@
 
Last edited:
Status
Not open for further replies.
Top