With this snippet we can create samp dialog.
Good luck...
Good luck...
Explain with 0.3.7 .:
PHP:
{$CLEO .cs}
0000:
wait 8500
WHILE TRUE
WAIT 0
IF 0AB0: 49 {Key 1}
THEN
0AC8: 0@ = allocate_memory_size 260
0AC8: 1@ = allocate_memory_size 260
0AC8: 2@ = allocate_memory_size 260
0AC8: 3@ = allocate_memory_size 260
0AD3: 0@ = format "This is Dialog caption"
0AD3: 1@ = format "DialogText %cDialogText" 0xA // 0xA - NEW LINE
0AD3: 2@ = format "Ok"
0AD3: 3@ = format "Close"
0AB1: @ShowDialog 6 id 1000 caption 0@ text 1@ button_1 2@ button_2 3@ style 2
wait 300
END
END
:ShowDialog
IF 0AA2: 10@ = "samp.dll"
THEN
0A8E: 11@ = 10@ + 0x21A0B8 // SAMP_DIALOG_INFO_OFFSET
0A8D: 12@ = readMem 11@ sz 4 vp 1
0A8E: 11@ = 10@ + 0x6B9C0 //SAMP_DIALOG_SHOW
0AA6: call_method 11@ struct 12@ num_params 7 pop 0 params 0 RightButton 4@ LeftButton 3@ dText 2@ Caption 1@ dType 5@ dID 0@ bServerside 0 _retVal 6@
END
0AB2: 0
Snippets.:
0.3.7
PHP:
:ShowDialog
IF 0AA2: 10@ = "samp.dll"
THEN
0A8E: 11@ = 10@ + 0x21A0B8 // SAMP_DIALOG_INFO_OFFSET
0A8D: 12@ = readMem 11@ sz 4 vp 1
0A8E: 11@ = 10@ + 0x6B9C0 //SAMP_DIALOG_SHOW
0AA6: call_method 11@ struct 12@ num_params 7 pop 0 params 0 RightButton 4@ LeftButton 3@ dText 2@ Caption 1@ dType 5@ dID 0@ bServerside 0 _retVal 6@
END
0AB2: 0
0.3.7-R2
PHP:
:ShowDialog
IF 0AA2: 10@ = "samp.dll"
THEN
0A8E: 11@ = 10@ + 0x21A0C0 // SAMP_DIALOG_INFO_OFFSET
0A8D: 12@ = readMem 11@ sz 4 vp 1
0A8E: 11@ = 10@ + 0x6BA70 //SAMP_DIALOG_SHOW
0AA6: call_method 11@ struct 12@ num_params 7 pop 0 params 0 RightButton 4@ LeftButton 3@ dText 2@ Caption 1@ dType 5@ dID 0@ bServerside 0 _retVal 6@
END
0AB2: 0
0.3.7-R3
PHP:
:ShowDialog
{
0.3.7 - R3
0AB1: @ShowDialog 6 id 1000 caption 0@ text 1@ button_1 2@ button_2 3@ style 2
}
IF 0AA2: 10@ = "samp.dll"
THEN
0A8E: 11@ = 10@ + 0x26E898 // SAMP_DIALOG_INFO_OFFSET
0A8D: 12@ = readMem 11@ sz 4 vp 1
0A8E: 11@ = 10@ + 0x6F8C0 //SAMP_DIALOG_SHOW
0AA6: call_method 11@ struct 12@ num_params 7 pop 0 params 0 RightButton 4@ LeftButton 3@ dText 2@ Caption 1@ dType 5@ dID 0@ bServerside 0 _retVal 6@
END
0AB2: 0
0.3.DL
PHP:
:ShowDialog
IF 0AA2: 10@ = "samp.dll"
THEN
0A8E: 11@ = 10@ + 0x2AC9E0 // SAMP_DIALOG_INFO_OFFSET
0A8D: 12@ = readMem 11@ sz 4 vp 1
0A8E: 11@ = 10@ + 0x6FA50 //SAMP_DIALOG_SHOW
0AA6: call_method 11@ struct 12@ num_params 7 pop 0 params 0 RightButton 4@ LeftButton 3@ dText 2@ Caption 1@ dType 5@ dID 0@ bServerside 0 _retVal 6@
END
0AB2: 0
0.3.7 - R4
PHP:
:ShowDialog
{
0.3.7 - R4
0AB1: @ShowDialog 6 id 1000 caption 0@ text 1@ button_1 2@ button_2 3@ style 2
}
IF 0AA2: 10@ = "samp.dll"
THEN
0A8E: 11@ = 10@ + 0x26E9C8 // SAMP_DIALOG_INFO_OFFSET
0A8D: 12@ = readMem 11@ sz 4 vp 1
0A8E: 11@ = 10@ + 0x6FFE0 //SAMP_DIALOG_SHOW
0AA6: call_method 11@ struct 12@ num_params 7 pop 0 params 0 RightButton 4@ LeftButton 3@ dText 2@ Caption 1@ dType 5@ dID 0@ bServerside 0 _retVal 6@
END
0AB2: 0
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
Memory source.:
https://github.com/SAMP-UDF/SAMP-UDF-for-AutoHotKey/blob/master/SAMP.ahk
Last edited: