CLEO Help 0BC9 w/o SAMPFUNCS

CLEO related
Status
Not open for further replies.

mpol77

Active member
Joined
Oct 24, 2018
Messages
66
Reaction score
6
SAMPFUNCS -> 0BC9: samp send_dialog_response dialog 0@ button 1@ listitem 2@ input ""
SAMP'S PAWN -> public OnDialogResponse(playerid, dialogid, response, listitem, inputtext[])

can you emulate this kind of request using 0.3DL offsets?
if so, what'd be the memory addresses?

thanks
 

dphome

Well-known member
Joined
Mar 21, 2020
Messages
456
Solutions
9
Reaction score
166
Location
Poland
by Parazitas
Code:
:CLOSE_DIALOG
{
    0.3.DL
    0AB1: @CLOSE_DIALOG 1 Button 0 // 0 = Left , 1 = Right
}
IF 0AA2: 10@ = "samp.dll"
THEN     
    0A8E: 11@ = 10@ + 0x2AC9E0 // SAMP_DIALOG_INFO_OFFSET
    0A8D: 12@ = readMem 11@ sz 4 vp 0
    0A8E: 11@ = 10@ + 0x700D0 //SAMP_DIALOG_CLOSE
    0AA8: call_function_method 11@ struct 12@ num_params 1 pop 0 0@ $NOT_USED
END
0AB2: 0
 

mpol77

Active member
Joined
Oct 24, 2018
Messages
66
Reaction score
6
very useful but sorry that is -> 0B47: samp close_current_dialog_with_button 0@
i need -> 0BC9: samp send_dialog_response dialog 0@ button 1@ listitem 2@ input ""
 

Parazitas

God
Joined
Jan 2, 2017
Messages
3,115
Solutions
5
Reaction score
879
Location
Lithuania
SAMPFUNCS -> 0BC9: samp send_dialog_response dialog 0@ button 1@ listitem 2@ input ""
SAMP'S PAWN -> public OnDialogResponse(playerid, dialogid, response, listitem, inputtext[])

can you emulate this kind of request using 0.3DL offsets?
if so, what'd be the memory addresses?

thanks

~ This opcode does 4 types of functions ~

1. Checks dialog id.
2. Send close button which was entered.
3. Selecting dialog list item which was entered.
4. Writing text to dialog editbox if any was entered.

All this functions you find in this forum by using button " search ".
All functions can work without SF.

1.
PHP:
:isDialogOpen
{
    0.3.DL
    0AB1: @isDialogOpen 1 DialogID -1 // -1 means any dialog
}
0AA2: 31@ = "samp.dll"
31@ += 0x2AC9E0
0A8D: 31@ = readMem 31@ sz 4 vp 0
0A8E: 30@ = 31@ + 0x28
0A8D: 30@ = readMem 30@ sz 4 vp 0
if 30@ == 1
then
    0A8E: 29@ = 31@ + 0x30 // DIALOG_ID_OFFSET
    0A8D: 29@ = readMem 29@ sz 4 vp 0
    if 0@ == -1
    then 0485: any_dialog
    else
        if 003B: 29@ == 0@
        then 0485: dialog_id_match
        else 059A: dialog_check_failed
        end
    end
else 059A: dialog_closed
end
0AB2: ret 0

2.
PHP:
:CLOSE_CURRENT_DIALOG_WITH_BUTTON
{
    0.3.DL
    0AB1: @CLOSE_CURRENT_DIALOG_WITH_BUTTON 1 Button 0 // 0 = Left , 1 = Right
}
IF 0AA2: 10@ = "samp.dll"
THEN
    0A8E: 11@ = 10@ + 0x2AC9E0 // SAMP_DIALOG_INFO_OFFSET
    0A8D: 12@ = readMem 11@ sz 4 vp 0
    0A8E: 11@ = 10@ + 0x700D0 //SAMP_DIALOG_CLOSE
    0AA8: call_function_method 11@ struct 12@ num_params 1 pop 0 0@ $NOT_USED
END
0AB2: 0

3.
PHP:
:SELLECT_CURRENT_DIALOG_LIST_ITEM
{
    0.3.DL
    0AB1: @SELLECT_CURRENT_DIALOG_LIST_ITEM 1 ItemNumber 1
}
0AA2: 1@ = "samp.dll"
1@ += 0x2AC9E0
0A8D: 1@ = readMem 1@ sz 4 vp 0
1@ += 0x1C
0A8D: 1@ = readMem 1@ sz 4 vp 0
1@ += 0x443
0A8C: write_memory 1@ size 1 value 0@ virtual_protect 0
0AB2: 0

4.
PHP:
:SET_DIALOG_EDIT_BOX_TEXT
{
    0.3.DL
    0AB1: @SET_DIALOG_EDIT_BOX_TEXT 1 Text 0@
}
if 0AA2: 2@ = "samp.dll"
then
    0A8E: 3@ = 2@ + 0x2AC9E0            // SAMP_DIALOG_INFO_OFFSET (DL)
    0A8D: 3@ = readMem 3@ sz 4 vp 0     // pDialog;
    0A8E: 4@ = 3@ + 0x24                // pDialog->pEditBox;
    0A8D: 4@ = readMem 4@ sz 4 vp 0     // pEditBox;

    0A8E: 5@ = 2@ + 0x85000 // CDXUTEditBox::SetText (offset for 0.3.DL)

    // CDXUTEditBox::SetText takes 2 params
    // 1 - pointer to zero terminated string
    // 2 - bool, if text is to be selected or not

    0AA8: call_function_method 5@ struct 4@ num_params 2 pop 0 _bSelected 0 _pszText 0@ _retVal 6@
end
0AB2: 0



I just wasted my time on this shit....
Bye..
 
Last edited:
Status
Not open for further replies.
Top