CLEO Help Get 2nd column text from a style 5 dialog and sending reponse to a style 5 dialog

CLEO related
Status
Not open for further replies.

bgbjgvbj

Member
Joined
Apr 17, 2021
Messages
6
Reaction score
1
Location
United States of America
Hi, currently i am working on a mod that sends responses to dialogs. You can pretty much say it's a mod that completes the dialogs for you. I searched for "style 5 dialog" on UGBASE but found nothing, so i decided to ask for help. I am currently having troubles with this dialog.

This is a style 5 dialog, you can see an example of a style 5 dialog here. If you have seen the style 5 dialog example, you should know that style 5 dialogs has stuff called "headers" and "columns".
What i am trying to do here is to get the username inside the 2nd column and then match it with a name to check if it's the correct player or not, and then it will press button 1 which is labeled "Remove".
I tried doing below (i am not gonna post the full script since it contains 525 lines):
Code:
0B54: SAMP 0@ = LISTBOX_ITEM_COUNT

FOR 1@ = 0 TO 0@
    0B5B: SAMP GET_LISTBOX_ITEM 1@ TEXT_TO temp2 // temp2 is allocated 72
    IF
        0C29:   temp = STRISTR STRING1 temp2 STRING2 sUsername // sUsername is allocated 16
    THEN
        0BC9: SAMP SEND_DIALOG_RESPONSE DIALOG 2096 BUTTON 1 LISTITEM 1@ INPUT 0                           
        0AF8: SAMP ADD_MESSAGE_TO_CHAT sUsername COLOR 0xFF0000 // USED FOR DEBUGGING, WILL BE REMOVED LATER
        BREAK
    END
    0AF8: SAMP ADD_MESSAGE_TO_CHAT temp2 COLOR -1 // USED FOR DEBUGGING, WILL BE REMOVED LATER
END

But all it gets is the first column text which is "1" and 0AF8: SAMP ADD_MESSAGE_TO_CHAT sUsername COLOR 0xFF0000 didn't trigger which means the text didn't contain the username, i tried searching for opcodes that has "header" or "column" in them but none of them has anything to do with SAMP dialogs.
It'd be a huge thanks if anyone can help me out with this.

If you're asking how i know it's a style 5 dialog, above the dialog you can see numbers. 2096 being the dialog id, and 5 being the dialog type. Yes i know, they are merged into one but that's because i didn't expect the dialog id to be in the thousands.
 

Attachments

  • Style 5.JPG
    Style 5.JPG
    17.1 KB · Views: 25
  • Style 5 ID.JPG
    Style 5 ID.JPG
    19.6 KB · Views: 26

bgbjgvbj

Member
Joined
Apr 17, 2021
Messages
6
Reaction score
1
Location
United States of America
Show what was wrong
Nothing was wrong with the GetCurrentDialogListboxItemText snippet.
I managed to make my own style 5 dialog with this piece of code:

Code:
0AC6: 20@ = LABEL @Text POINTER
0B3B: SAMP SHOW_DIALOG ID 1383 CAPTION "Caption" TEXT 20@ BUTTON_1 "Button 1" BUTTON_2 "Button 2" STYLE 5

:Text
HEX
    "Header 1" 09
    "Header 2" 0A
    
    "Item 1 Column 1" 09
    "Item 1 Column 2" 0A
    
    "Item 2 Column 1" 09
    "Item 2 Column 2" 0A
    
    "Item 3 Column 1" 09
    "Item 3 Column 2" 0A
    00
END

It has pretty much all the elements that the server dialog had, i was hoping it would help me figure out the answer by also using:

Code:
IF
    0B3C:  SAMP IS_DIALOG_RESPONDED ID 1383 BUTTON 1@ LIST_ITEM 2@ INPUT_TEXT 0
THEN
    0AF8: SAMP ADD_MESSAGE_TO_CHAT "Button: %d" COLOR -1 1@
    0AF8: SAMP ADD_MESSAGE_TO_CHAT "Listitem: %d" COLOR -1 2@
END

Everything seemed normal, there may be an input text but when i checked, it returned as a weird character.
But when i tried to send a dialog response to the server dialog (not my mod's dialog) with this:
Code:
IF
    0AB0:   IS_KEY_PRESSED 76
THEN
    IF
        0BDA:  SAMP IS_DIALOG_CLIENTSIDE
    THEN
        0ACD: SHOW_TEXT_HIGHPRIORITY "Dialog is clientside" TIME 1000
    ELSE  
        0ACD: SHOW_TEXT_HIGHPRIORITY "Dialog is not clientside" TIME 1000
    END    
    0BC9: SAMP SEND_DIALOG_RESPONSE DIALOG 2096 BUTTON 1 LISTITEM 0 INPUT 0
END
Nothing really happened as you can see in this video, everytime the "Dialog is not clientside" text appears means that i tried to send the response.
 

bgbjgvbj

Member
Joined
Apr 17, 2021
Messages
6
Reaction score
1
Location
United States of America
I know how to use 0B3C and 0BC9, the only problem with 0B3C is that it doesn't work on serverside dialogs. Which is why i made my own style 5 dialog to check how it works. And also 0BC9 doesn't work on clientside dialogs so i can't test it on the dialog i made.
I made some changes to my dialog testing script:
Code:
{$CLEO .cs}
0000:

29@ = 0
0AC8: 3@ = ALLOCATE_MEMORY_SIZE 70

WHILE TRUE
    WAIT 0
    IF
        0AB0:   IS_KEY_PRESSED 220 // \ key
    THEN
        29@ += 1
        IF
            29@ == 1 // ANTI SPAM
        THEN
            0AC6: 20@ = LABEL @Text POINTER
            0B3B: SAMP SHOW_DIALOG ID 1383 CAPTION "Caption" TEXT 20@ BUTTON_1 "Button 1" BUTTON_2 "Button 2" STYLE 5
        END
    ELSE
        IF AND
            NOT 29@ == 0
            8AB0:   NOT IS_KEY_PRESSED 122 // F11 key
        THEN
            29@ == 0
        END 
    END
    0B4E: SAMP 30@ = GET_CURRENT_DIALOG_ID
    IF
        0B3C:  SAMP IS_DIALOG_RESPONDED ID 30@ BUTTON 1@ LIST_ITEM 2@ INPUT_TEXT 3@
    THEN
        0AF8: SAMP ADD_MESSAGE_TO_CHAT "Dialog %d received response: Button %d Listitem %d Input %s" COLOR -1 30@ 1@ 2@ 3@ // 3@ IS ALLOCATED 70
    END
    IF
        0AB0:   IS_KEY_PRESSED 122 // F11 key
    THEN
        29@ += 1
        IF
            29@ == 1 // ANTI SPAM
        THEN
            IF
                0BDA:  SAMP IS_DIALOG_CLIENTSIDE
            THEN
                0AF8: SAMP ADD_MESSAGE_TO_CHAT "Dialog %d is clientside" COLOR -1 30@
            ELSE
                0AF8: SAMP ADD_MESSAGE_TO_CHAT "Dialog %d is not clientside" COLOR -1 30@
            END 
            0BC9: SAMP SEND_DIALOG_RESPONSE DIALOG 30@ BUTTON 1 LISTITEM 0 INPUT 0
            0AF8: SAMP ADD_MESSAGE_TO_CHAT "Sent response to dialog %d: Button 1 Listitem 0 Input 0" COLOR -1 30@
        END
    ELSE
        IF AND
            NOT 29@ == 0
            8AB0:   NOT IS_KEY_PRESSED 220 // \ key
        THEN
            29@ = 0
        END
    END
END

:Text
HEX
    "Header 1" 09
    "Header 2" 0A
  
    "Item 1 Column 1" 09
    "Item 1 Column 2" 0A
  
    "Item 2 Column 1" 09
    "Item 2 Column 2" 0A
  
    "Item 3 Column 1" 09
    "Item 3 Column 2" 0A
    00
END

And here's how it went
If you didn't know already, the first dialog is the clientside dialog i made. And the second dialog is the serverside dialog that the server made.
And as a proof that 0BC9 works, i tested it on a style 2 serverside dialog.
 
Last edited:

bgbjgvbj

Member
Joined
Apr 17, 2021
Messages
6
Reaction score
1
Location
United States of America
Surprisingly that snippet works on serverside dialogs. Sadly though it doesn't answer the mystery.
Code:
Code:
{$CLEO .cs}
0000:

REPEAT
    WAIT 10
UNTIL 0AFA: IS_SAMP_AVAILABLE

25@ = 10000
4@ = 0
0AC8: 3@ = ALLOCATE_MEMORY_SIZE 70
0AC8: 8@ = ALLOCATE_MEMORY_SIZE 70
0AC8: 9@ = ALLOCATE_MEMORY_SIZE 70
0AC8: 10@ = ALLOCATE_MEMORY_SIZE 70
0AC8: 11@ = ALLOCATE_MEMORY_SIZE 70

WHILE TRUE
    WAIT 0
    IF
        0AB0:   IS_KEY_PRESSED 220
    THEN
        4@ += 1
        IF
            4@ == 1
        THEN
            0AC6: 5@ = LABEL @Text POINTER
            0B3B: SAMP SHOW_DIALOG ID 1383 CAPTION "Caption" TEXT 5@ BUTTON_1 "Button 1" BUTTON_2 "Button 2" STYLE 5
        END
    ELSE
        IF AND
            NOT 4@ == 0
            8AB0:   NOT IS_KEY_PRESSED 122
        THEN
            4@ == 0
        END  
    END
    0AB1: @isDialogResponded 0 _Returned: ID 6@ Type 7@ ListboxItem 2@ Button 1@ Text 8@ InputText 3@ Caption 9@ LeftButtonText 10@ RightButtonText 11@
    IF
        803B:   NOT 25@ == 1@  // (INT) // ANTI SPAM
    THEN
        IF
            NOT 6@ == 0
        THEN
            0AF8: SAMP ADD_MESSAGE_TO_CHAT "Dialog %d Type %d Listitem %d Button %d InputText %s" COLOR -1 6@ 7@ 2@ 1@ 3@
            0AF8: SAMP ADD_MESSAGE_TO_CHAT "Text %s" COLOR -1 8@
            0AF8: SAMP ADD_MESSAGE_TO_CHAT "Caption %s" COLOR -1 9@
            0AF8: SAMP ADD_MESSAGE_TO_CHAT "LeftButtonText %s" COLOR -1 10@
            0AF8: SAMP ADD_MESSAGE_TO_CHAT "RightButtonText %s" COLOR -1 11@
            0085: 25@ = 1@ // (INT)
        END
    END
    IF
        0AB0:   IS_KEY_PRESSED 122
    THEN
        4@ += 1
        IF
            4@ == 1
        THEN
            IF
                0BDA:  SAMP IS_DIALOG_CLIENTSIDE
            THEN
                0AF8: SAMP ADD_MESSAGE_TO_CHAT "Dialog %d is clientside" COLOR -1 6@
            ELSE
                0AF8: SAMP ADD_MESSAGE_TO_CHAT "Dialog %d is not clientside" COLOR -1 6@
            END  
            0BC9: SAMP SEND_DIALOG_RESPONSE DIALOG 6@ BUTTON 1 LISTITEM 0 INPUT 0
            0AF8: SAMP ADD_MESSAGE_TO_CHAT "Sent response to dialog %d: Button 1 Listitem 0 Input 0" COLOR -1 6@
        END
    ELSE
        IF AND
            NOT 4@ == 0
            8AB0:   NOT IS_KEY_PRESSED 220
        THEN
            4@ = 0
        END
    END
END

:Text
HEX
    "Header 1" 09
    "Header 2" 0A
   
    "Item 1 Column 1" 09
    "Item 1 Column 2" 0A
   
    "Item 2 Column 1" 09
    "Item 2 Column 2" 0A
   
    "Item 3 Column 1" 09
    "Item 3 Column 2" 0A
    00
END

:isDialogResponded
{
    0.3.7 - R1
    0AB1: @isDialogResponded 0 _Returned: ID 0@ Type 1@ ListboxItem 2@ Button 3@ Text 4@ InputText 5@ Caption 6@ LeftButtonText 7@ RightButtonText 8@
}
IF 0AA2: 31@ = "samp.dll"
THEN
    0A8E: 30@ = 31@ + 0x21A0B8 // DIALOG_POINTER_OFFSET
    0A8D: 30@ = readMem 30@ sz 4 vp 0
    0A8E: 29@ = 30@ + 0x28 // DIALOG_OPEN_OFFSET
    0A8D: 29@ = readMem 29@ sz 4 vp 0
    IF 29@ == TRUE // DIALOG OPEN
    THEN

        0A8E: 28@ = 30@ + 0x30 // DIALOG_ID_OFFSET
        0A8D: 28@ = readMem 28@ sz 4 vp 0

        0A8E: 27@ = 30@ + 0x2C // DIALOG_TYPE_OFFSET
        0A8D: 27@ = readMem 27@ sz 4 vp 0
        IF OR
        27@ == 2 // DIALOG_STYLE_LIST
        27@ == 4 // DIALOG_STYLE_TABLIST
        27@ == 5 // DIALOG_STYLE_TABLIST_HEADERS
        THEN
            0A8E: 26@ = 30@ + 0x20 // DIALOG_WITH_LIST_OFFSET  
            0A8D: 26@ = readMem 26@ sz 4 vp 0
            0A8E: 25@ = 31@ + 0x84850 // DIALOG_GET_LIST_ITEM_OFFSET
            0AA8: call_function_method 25@ struct 26@ num_params 1 pop 0 -1 _Returned: ListboxItem 24@
        ELSE 24@ = -1
        END

        IF OR
        27@ == 0 // DIALOG_STYLE_MSGBOX
        27@ == 1 // DIALOG_STYLE_INPUT
        27@ == 3 // DIALOG_STYLE_PASSWORD
        THEN
            0A8E: 14@ = 30@ + 0x34 // DIALOG_TEXT_OFFSET
            0A8D: 14@ = readMem 14@ sz 4 vp 0
        ELSE 14@ = 0
        END

        IF OR
        27@ == 1 // DIALOG_STYLE_INPUT
        27@ == 3 // DIALOG_STYLE_PASSWORD
        THEN
            0A8E: 23@ = 30@ + 0x24 // DIALOG_EDIT_BOX_OFFSET  
            0A8D: 23@ = readMem 23@ sz 4 vp 0
            0A8E: 22@ = 31@ + 0x81030 // DIALOG_GET_EDIT_BOX_TEXT_OFFSET
            0AA8: call_function_method 22@ struct 23@ num_params 0 pop 0 _Returned: InputText 21@
        ELSE 21@ = 0
        END

        0A8E: 20@ = 30@ + 0x40 // DIALOG_CAPTION_OFFSET

        0A8E: 19@ = 30@ + 0x20 // DIALOG_FIRST_POINTER_OFFSET  
        0A8D: 19@ = readMem 19@ sz 4 vp 0

        0A8E: 18@ = 19@ + 0x1AD // DIALOG_LEFT_BUTTON_TEXT_OFFSET
        0A8D: 16@ = readMem 18@ sz 1 vp 0
        IF NOT 16@ > 0
        THEN 18@ = 0
        END

        0A8E: 10@ = 19@ + 0x20
        0A8D: 10@ = readMem 10@ sz 4 vp 0
        10@ += 0x50
        0A8D: 10@ = readMem 10@ sz 4 vp 0
        0A8E: 17@ = 10@ + 0x4D // DIALOG_RIGHT_BUTTON_TEXT_OFFSET
        0A8D: 15@ = readMem 17@ sz 1 vp 0
        IF NOT 15@ > 0
        THEN 17@ = 0
        END

        0A8E: 13@ = 19@ + 0x166 // DIALOG_LEFT_BUTTON_CLICKED_OFFSET
        0A8D: 13@ = readMem 13@ sz 1 vp 0

        0A8E: 12@ = 10@ + 0x6 // DIALOG_RIGHT_BUTTON_CLICKED_OFFSET
        0A8D: 12@ = readMem 12@ sz 1 vp 0
        IF OR
        0AB0: 27 // ESC
        12@ == 1
        THEN 11@ = 0 // RIGHT_BUTTON_WAS_CLICKED
        ELSE
            IF OR
            0AB0: 13 // ENTER
            13@ == 1
            THEN  11@ = 1 // LEFT_BUTTON_WAS_CLICKED
            ELSE 11@ = -1 // RESET_CLICKED_BUTTONS
            END
        END
    ELSE
        11@ = -1 // RESET_CLICKED_BUTTONS
    END
END
0AB2: 9 28@ 27@ 24@ 11@ 14@ 21@ 20@ 18@ 17@
While we're at it, i might as well change the thread title.
 
Last edited:

Parazitas

God
Joined
Jan 2, 2017
Messages
3,112
Solutions
5
Reaction score
878
Location
Lithuania
Surprisingly that snippet works on serverside dialogs. Sadly though it doesn't answer the mystery.
Code:
Code:
{$CLEO .cs}
0000:

REPEAT
    WAIT 10
UNTIL 0AFA: IS_SAMP_AVAILABLE

25@ = 10000
4@ = 0
0AC8: 3@ = ALLOCATE_MEMORY_SIZE 70
0AC8: 8@ = ALLOCATE_MEMORY_SIZE 70
0AC8: 9@ = ALLOCATE_MEMORY_SIZE 70
0AC8: 10@ = ALLOCATE_MEMORY_SIZE 70
0AC8: 11@ = ALLOCATE_MEMORY_SIZE 70

WHILE TRUE
    WAIT 0
    IF
        0AB0:   IS_KEY_PRESSED 220
    THEN
        4@ += 1
        IF
            4@ == 1
        THEN
            0AC6: 5@ = LABEL @Text POINTER
            0B3B: SAMP SHOW_DIALOG ID 1383 CAPTION "Caption" TEXT 5@ BUTTON_1 "Button 1" BUTTON_2 "Button 2" STYLE 5
        END
    ELSE
        IF AND
            NOT 4@ == 0
            8AB0:   NOT IS_KEY_PRESSED 122
        THEN
            4@ == 0
        END
    END
    0AB1: @isDialogResponded 0 _Returned: ID 6@ Type 7@ ListboxItem 2@ Button 1@ Text 8@ InputText 3@ Caption 9@ LeftButtonText 10@ RightButtonText 11@
    IF
        803B:   NOT 25@ == 1@  // (INT) // ANTI SPAM
    THEN
        IF
            NOT 6@ == 0
        THEN
            0AF8: SAMP ADD_MESSAGE_TO_CHAT "Dialog %d Type %d Listitem %d Button %d InputText %s" COLOR -1 6@ 7@ 2@ 1@ 3@
            0AF8: SAMP ADD_MESSAGE_TO_CHAT "Text %s" COLOR -1 8@
            0AF8: SAMP ADD_MESSAGE_TO_CHAT "Caption %s" COLOR -1 9@
            0AF8: SAMP ADD_MESSAGE_TO_CHAT "LeftButtonText %s" COLOR -1 10@
            0AF8: SAMP ADD_MESSAGE_TO_CHAT "RightButtonText %s" COLOR -1 11@
            0085: 25@ = 1@ // (INT)
        END
    END
    IF
        0AB0:   IS_KEY_PRESSED 122
    THEN
        4@ += 1
        IF
            4@ == 1
        THEN
            IF
                0BDA:  SAMP IS_DIALOG_CLIENTSIDE
            THEN
                0AF8: SAMP ADD_MESSAGE_TO_CHAT "Dialog %d is clientside" COLOR -1 6@
            ELSE
                0AF8: SAMP ADD_MESSAGE_TO_CHAT "Dialog %d is not clientside" COLOR -1 6@
            END
            0BC9: SAMP SEND_DIALOG_RESPONSE DIALOG 6@ BUTTON 1 LISTITEM 0 INPUT 0
            0AF8: SAMP ADD_MESSAGE_TO_CHAT "Sent response to dialog %d: Button 1 Listitem 0 Input 0" COLOR -1 6@
        END
    ELSE
        IF AND
            NOT 4@ == 0
            8AB0:   NOT IS_KEY_PRESSED 220
        THEN
            4@ = 0
        END
    END
END

:Text
HEX
    "Header 1" 09
    "Header 2" 0A
 
    "Item 1 Column 1" 09
    "Item 1 Column 2" 0A
 
    "Item 2 Column 1" 09
    "Item 2 Column 2" 0A
 
    "Item 3 Column 1" 09
    "Item 3 Column 2" 0A
    00
END

:isDialogResponded
{
    0.3.7 - R1
    0AB1: @isDialogResponded 0 _Returned: ID 0@ Type 1@ ListboxItem 2@ Button 3@ Text 4@ InputText 5@ Caption 6@ LeftButtonText 7@ RightButtonText 8@
}
IF 0AA2: 31@ = "samp.dll"
THEN
    0A8E: 30@ = 31@ + 0x21A0B8 // DIALOG_POINTER_OFFSET
    0A8D: 30@ = readMem 30@ sz 4 vp 0
    0A8E: 29@ = 30@ + 0x28 // DIALOG_OPEN_OFFSET
    0A8D: 29@ = readMem 29@ sz 4 vp 0
    IF 29@ == TRUE // DIALOG OPEN
    THEN

        0A8E: 28@ = 30@ + 0x30 // DIALOG_ID_OFFSET
        0A8D: 28@ = readMem 28@ sz 4 vp 0

        0A8E: 27@ = 30@ + 0x2C // DIALOG_TYPE_OFFSET
        0A8D: 27@ = readMem 27@ sz 4 vp 0
        IF OR
        27@ == 2 // DIALOG_STYLE_LIST
        27@ == 4 // DIALOG_STYLE_TABLIST
        27@ == 5 // DIALOG_STYLE_TABLIST_HEADERS
        THEN
            0A8E: 26@ = 30@ + 0x20 // DIALOG_WITH_LIST_OFFSET
            0A8D: 26@ = readMem 26@ sz 4 vp 0
            0A8E: 25@ = 31@ + 0x84850 // DIALOG_GET_LIST_ITEM_OFFSET
            0AA8: call_function_method 25@ struct 26@ num_params 1 pop 0 -1 _Returned: ListboxItem 24@
        ELSE 24@ = -1
        END

        IF OR
        27@ == 0 // DIALOG_STYLE_MSGBOX
        27@ == 1 // DIALOG_STYLE_INPUT
        27@ == 3 // DIALOG_STYLE_PASSWORD
        THEN
            0A8E: 14@ = 30@ + 0x34 // DIALOG_TEXT_OFFSET
            0A8D: 14@ = readMem 14@ sz 4 vp 0
        ELSE 14@ = 0
        END

        IF OR
        27@ == 1 // DIALOG_STYLE_INPUT
        27@ == 3 // DIALOG_STYLE_PASSWORD
        THEN
            0A8E: 23@ = 30@ + 0x24 // DIALOG_EDIT_BOX_OFFSET
            0A8D: 23@ = readMem 23@ sz 4 vp 0
            0A8E: 22@ = 31@ + 0x81030 // DIALOG_GET_EDIT_BOX_TEXT_OFFSET
            0AA8: call_function_method 22@ struct 23@ num_params 0 pop 0 _Returned: InputText 21@
        ELSE 21@ = 0
        END

        0A8E: 20@ = 30@ + 0x40 // DIALOG_CAPTION_OFFSET

        0A8E: 19@ = 30@ + 0x20 // DIALOG_FIRST_POINTER_OFFSET
        0A8D: 19@ = readMem 19@ sz 4 vp 0

        0A8E: 18@ = 19@ + 0x1AD // DIALOG_LEFT_BUTTON_TEXT_OFFSET
        0A8D: 16@ = readMem 18@ sz 1 vp 0
        IF NOT 16@ > 0
        THEN 18@ = 0
        END

        0A8E: 10@ = 19@ + 0x20
        0A8D: 10@ = readMem 10@ sz 4 vp 0
        10@ += 0x50
        0A8D: 10@ = readMem 10@ sz 4 vp 0
        0A8E: 17@ = 10@ + 0x4D // DIALOG_RIGHT_BUTTON_TEXT_OFFSET
        0A8D: 15@ = readMem 17@ sz 1 vp 0
        IF NOT 15@ > 0
        THEN 17@ = 0
        END

        0A8E: 13@ = 19@ + 0x166 // DIALOG_LEFT_BUTTON_CLICKED_OFFSET
        0A8D: 13@ = readMem 13@ sz 1 vp 0

        0A8E: 12@ = 10@ + 0x6 // DIALOG_RIGHT_BUTTON_CLICKED_OFFSET
        0A8D: 12@ = readMem 12@ sz 1 vp 0
        IF OR
        0AB0: 27 // ESC
        12@ == 1
        THEN 11@ = 0 // RIGHT_BUTTON_WAS_CLICKED
        ELSE
            IF OR
            0AB0: 13 // ENTER
            13@ == 1
            THEN  11@ = 1 // LEFT_BUTTON_WAS_CLICKED
            ELSE 11@ = -1 // RESET_CLICKED_BUTTONS
            END
        END
    ELSE
        11@ = -1 // RESET_CLICKED_BUTTONS
    END
END
0AB2: 9 28@ 27@ 24@ 11@ 14@ 21@ 20@ 18@ 17@
While we're at it, i might as well change the thread title.

https://ugbase.eu/threads/snippet-get-set-current-dialog-list-item.22340/
 

bgbjgvbj

Member
Joined
Apr 17, 2021
Messages
6
Reaction score
1
Location
United States of America
Hmm, i always thought that opcode replaces the listitem text. But after testing it out, it actually selects the listitem for you. In theory, if i combine it with 0B47: SAMP CLOSE_CURRENT_DIALOG_WITH_BUTTON 1 it should fix the problem. Once again big thanks man. You might want to change 0AB1: @Set_current_dialog_list_item 0 item 5 to 0AB1: @Set_current_dialog_list_item 1 item 5 at https://ugbase.eu/threads/some-snippets.20983/post-127267 since that's where you post your snippets.
 
Last edited:

Parazitas

God
Joined
Jan 2, 2017
Messages
3,112
Solutions
5
Reaction score
878
Location
Lithuania
Hmm, i always thought that opcode replaces the listitem text. But after testing it out, it actually selects the listitem for you. In theory, if i combine it with 0B47: SAMP CLOSE_CURRENT_DIALOG_WITH_BUTTON 1 it should fix the problem. Once again big thanks man. You might want to change 0AB1: @Set_current_dialog_list_item 0 item 5 to 0AB1: @Set_current_dialog_list_item 1 item 5 at https://ugbase.eu/threads/some-snippets.20983/post-127267 since that's where you post your snippets.

Oh, yeah, forgot about that.
Sorted. Thx.
 
Status
Not open for further replies.
Top