{$CLEO .cs}
0000:
REPEAT
WAIT 0
UNTIL 0AFA: SAMP_IS_READY
alloc 2@ 32
format 2@ "Obtain" //dialog title to detect Romania language
while true
wait 0
if
0B4C: samp is_dialog_active -1
then
alloc 3@ 256
0BD8: samp get_dialog_caption 3@
if 0C14: strcmp string1 2@ string2 3@ //comparing
then
free 3@
wait 100
0AB1: @FAKE_KEYPRESS 1 _OFFSET_KEY_ 0x59 {Enter}
wait 1000
0B4B: samp set_current_dialog_editbox_text "1"
0B47: samp close_current_dialog_with_button 1
0A93: end_custom_thread
end
end
wait 500
END
/////////////////////// Snipppet ///////////////////////
/////////// Snippet for Press key
:FAKE_KEYPRESS
if 0AA2: 2@ = load_library "User32.dll"
then
if 0AA4: 2@ = get_proc_address "keybd_event" library 2@
then
0AA5: call 2@ num_params 4 pop 0 0 0 0 0@
wait 1@
0AA5: call 2@ num_params 4 pop 0 0 0x02 0 0@
end
end
0AB2: ret 0
0000:
REPEAT
WAIT 0
UNTIL 0AFA: SAMP_IS_READY
alloc 2@ 32
format 2@ "Obtain" //dialog title to detect Romania language
while true
wait 0
if
0B4C: samp is_dialog_active -1
then
alloc 3@ 256
0BD8: samp get_dialog_caption 3@
if 0C14: strcmp string1 2@ string2 3@ //comparing
then
free 3@
wait 100
0AB1: @FAKE_KEYPRESS 1 _OFFSET_KEY_ 0x59 {Enter}
wait 1000
0B4B: samp set_current_dialog_editbox_text "1"
0B47: samp close_current_dialog_with_button 1
0A93: end_custom_thread
end
end
wait 500
END
/////////////////////// Snipppet ///////////////////////
/////////// Snippet for Press key
:FAKE_KEYPRESS
if 0AA2: 2@ = load_library "User32.dll"
then
if 0AA4: 2@ = get_proc_address "keybd_event" library 2@
then
0AA5: call 2@ num_params 4 pop 0 0 0 0 0@
wait 1@
0AA5: call 2@ num_params 4 pop 0 0 0x02 0 0@
end
end
0AB2: ret 0