CLEO Help samp set_current_dialog_item_list is not working.

CLEO related
Status
Not open for further replies.

Sinecure

Member
Joined
Mar 28, 2015
Messages
14
Reaction score
0
I'm using @monday 's auto produce drugs but the dialog doesn't select the 4th item which bugges the whole script, can anyone help me out?

Code:
say "/buy"
        wait 10@
        for 30@ = 1 to 5
            call @WaitRandomTime 2 lowerBorder 11@ higherBorder 12@            
            0B49: samp set_current_dialog_list_item 4 // 3 id could be 4th item
            wait 100
            0B47: samp close_current_dialog_with_button 1 //buy button
        end
        0B47: samp close_current_dialog_with_button 2 //close button
        wait 13@
 

monday

Expert
Joined
Jun 23, 2014
Messages
1,127
Solutions
1
Reaction score
158
I forgot about it completely but 4 months ago someone told me about the same issue and using "fake keypress" function solved the issue:
https://pastebin.com/RaMTP2Pg

Btw did you try to change the "4" into "3" as suggested in the comment? I remember that I checked it and using:
0B49: samp set_current_dialog_list_item 4
actually selected 5th item


Someone tested using "3" in that opcode on IMRP and said it didn't work there and suggested it can be some different dialog type but idk.

Btw that pastebin link code was tested by 1 person who said it didn't work, after investigating it for some time it turned out that setting "case conversion" into "as is" in Sanny Builder settings before compiling the code made it work. It can be set at:
Sanny builder -> tools -> options -> formats -> "Case converting"
 
Last edited:

Sinecure

Member
Joined
Mar 28, 2015
Messages
14
Reaction score
0
I removed wait 100 and changed the 4 to 3 and it worked

can the admins see /autodrugs and can you make it into a key activation instead of a command?
 

Valiuks

Active member
Joined
Sep 9, 2018
Messages
25
Reaction score
4
just to suggest, use 0B4C after /buy as sometimes I had similar problem when server lags and wait command is useless
 
Status
Not open for further replies.
Top