bgbjgvbj
Member
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):
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.
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.