{$CLEO}
0000:
while not Samp.Available()
wait 100
end
while true
wait 0
if 0C5D: samp textdraw 2116 is_exists
then
if 0C18: 24@ = strstr string1 2116 string2 "LD_BEAT:up"
then
for 15@ = 2117 to 2120
0C5A: samp textdraw 15@ get_string_to 10@
if 0C18: 24@ = strstr string1 10@ string2 "LD_BEAT:up"
then
wait 500
0BCA: samp send_click_textdraw 15@
end
end
end
if 0C18: 24@ = strstr string1 2116 string2 "LD_BEAT:left"
then
for 15@ = 2117 to 2120
0C5A: samp textdraw 15@ get_string_to 10@
if 0C18: 24@ = strstr string1 10@ string2 "LD_BEAT:left"
then
wait 500
0BCA: samp send_click_textdraw 15@
end
end
end
if 0C18: 24@ = strstr string1 2116 string2 "LD_BEAT:right"
then
for 15@ = 2117 to 2120
0C5A: samp textdraw 15@ get_string_to 10@
if 0C18: 24@ = strstr string1 10@ string2 "LD_BEAT:right"
then
wait 500
0BCA: samp send_click_textdraw 15@
end
end
end
if 0C18: 24@ = strstr string1 2116 string2 "LD_BEAT:down"
then
for 15@ = 2117 to 2120
0C5A: samp textdraw 15@ get_string_to 10@
if 0C18: 24@ = strstr string1 10@ string2 "LD_BEAT:down"
then
wait 500
0BCA: samp send_click_textdraw 15@
end
end
end
end
end
{$CLEO}
0000:
while not Samp.Available()
wait 100
end
while true
wait 0
if 0C5D: samp textdraw 2116 is_exists
then
0C5A: samp textdraw 2116 get_string_to 15@
if 0C18: 24@ = strstr string1 15@ string2 "LD_BEAT:up"
then
for 15@ = 2117 to 2120
0C5A: samp textdraw 15@ get_string_to 10@
if 0C18: 24@ = strstr string1 10@ string2 "LD_BEAT:up"
then
wait 500
0BCA: samp send_click_textdraw 15@
end
end
end
if 0C18: 24@ = strstr string1 15@ string2 "LD_BEAT:left"
then
for 15@ = 2117 to 2120
0C5A: samp textdraw 15@ get_string_to 10@
if 0C18: 24@ = strstr string1 10@ string2 "LD_BEAT:left"
then
wait 500
0BCA: samp send_click_textdraw 15@
end
end
end
if 0C18: 24@ = strstr string1 15@ string2 "LD_BEAT:right"
then
for 15@ = 2117 to 2120
0C5A: samp textdraw 15@ get_string_to 10@
if 0C18: 24@ = strstr string1 10@ string2 "LD_BEAT:right"
then
wait 500
0BCA: samp send_click_textdraw 15@
end
end
end
if 0C18: 24@ = strstr string1 15@ string2 "LD_BEAT:down"
then
for 15@ = 2117 to 2120
0C5A: samp textdraw 15@ get_string_to 10@
if 0C18: 24@ = strstr string1 10@ string2 "LD_BEAT:down"
then
wait 500
0BCA: samp send_click_textdraw 15@
end
end
end
end
end
{$CLEO}
0000:
while not Samp.Available()
wait 100
end
alloc 15@ = 256
alloc 10@ = 256
alloc 24@ = 256
while true
wait 0
if 0C5D: samp textdraw 2116 is_exists
then
0C5A: samp textdraw 2116 get_string_to 15@
if 0C18: 24@ = strstr string1 15@ string2 "LD_BEAT:up"
then
for 15@ = 2117 to 2120
0C5A: samp textdraw 15@ get_string_to 10@
if 0C18: 24@ = strstr string1 10@ string2 "LD_BEAT:up"
then
wait 500
0BCA: samp send_click_textdraw 15@
end
end
end
if 0C18: 24@ = strstr string1 15@ string2 "LD_BEAT:left"
then
for 15@ = 2117 to 2120
0C5A: samp textdraw 15@ get_string_to 10@
if 0C18: 24@ = strstr string1 10@ string2 "LD_BEAT:left"
then
wait 500
0BCA: samp send_click_textdraw 15@
end
end
end
if 0C18: 24@ = strstr string1 15@ string2 "LD_BEAT:right"
then
for 15@ = 2117 to 2120
0C5A: samp textdraw 15@ get_string_to 10@
if 0C18: 24@ = strstr string1 10@ string2 "LD_BEAT:right"
then
wait 500
0BCA: samp send_click_textdraw 15@
end
end
end
if 0C18: 24@ = strstr string1 15@ string2 "LD_BEAT:down"
then
for 15@ = 2117 to 2120
0C5A: samp textdraw 15@ get_string_to 10@
if 0C18: 24@ = strstr string1 10@ string2 "LD_BEAT:down"
then
wait 500
0BCA: samp send_click_textdraw 15@
end
end
end
end
end
Пока ты их не уберешь работать не станет. Зачем они тут вообще?Память я выделил, но всё-равно чего-то нехватает.
Ну а насчет циклов, я их уберу когда работать станетCLEO:{$CLEO} 0000: while not Samp.Available() wait 100 end alloc 15@ = 256 alloc 10@ = 256 alloc 24@ = 256 while true wait 0 if 0C5D: samp textdraw 2116 is_exists then 0C5A: samp textdraw 2116 get_string_to 15@ if 0C18: 24@ = strstr string1 15@ string2 "LD_BEAT:up" then for 15@ = 2117 to 2120 0C5A: samp textdraw 15@ get_string_to 10@ if 0C18: 24@ = strstr string1 10@ string2 "LD_BEAT:up" then wait 500 0BCA: samp send_click_textdraw 15@ end end end if 0C18: 24@ = strstr string1 15@ string2 "LD_BEAT:left" then for 15@ = 2117 to 2120 0C5A: samp textdraw 15@ get_string_to 10@ if 0C18: 24@ = strstr string1 10@ string2 "LD_BEAT:left" then wait 500 0BCA: samp send_click_textdraw 15@ end end end if 0C18: 24@ = strstr string1 15@ string2 "LD_BEAT:right" then for 15@ = 2117 to 2120 0C5A: samp textdraw 15@ get_string_to 10@ if 0C18: 24@ = strstr string1 10@ string2 "LD_BEAT:right" then wait 500 0BCA: samp send_click_textdraw 15@ end end end if 0C18: 24@ = strstr string1 15@ string2 "LD_BEAT:down" then for 15@ = 2117 to 2120 0C5A: samp textdraw 15@ get_string_to 10@ if 0C18: 24@ = strstr string1 10@ string2 "LD_BEAT:down" then wait 500 0BCA: samp send_click_textdraw 15@ end end end end end
{$CLEO}
0000:
while not Samp.Available()
wait 100
end
while true
wait 0
if 0C5D: samp textdraw 2116 is_exists
then
0C5A: samp textdraw 2116 get_string_to 15@
0C5A: samp textdraw 2117 get_string_to 16@
0C5A: samp textdraw 2118 get_string_to 17@
0C5A: samp textdraw 2119 get_string_to 18@
0C5A: samp textdraw 2120 get_string_to 19@
if
0039: 16@ == 15@
then
wait 500
0BCA: samp send_click_textdraw 2117
end
if
0039: 17@ == 15@
then
wait 500
0BCA: samp send_click_textdraw 2118
end
if
0039: 18@ == 15@
then
wait 500
0BCA: samp send_click_textdraw 2119
end
if
0039: 19@ == 15@
then
wait 500
0BCA: samp send_click_textdraw 2120
end
end
end
Не выделил память под текст. И строки сравнивай опкодом 0c14.Попробовал сделать вот так, вроде нажимает, но, похоже с ошибками:
CLEO:{$CLEO} 0000: while not Samp.Available() wait 100 end while true wait 0 if 0C5D: samp textdraw 2116 is_exists then 0C5A: samp textdraw 2116 get_string_to 15@ 0C5A: samp textdraw 2117 get_string_to 16@ 0C5A: samp textdraw 2118 get_string_to 17@ 0C5A: samp textdraw 2119 get_string_to 18@ 0C5A: samp textdraw 2120 get_string_to 19@ if 0039: 16@ == 15@ then wait 500 0BCA: samp send_click_textdraw 2117 end if 0039: 17@ == 15@ then wait 500 0BCA: samp send_click_textdraw 2118 end if 0039: 18@ == 15@ then wait 500 0BCA: samp send_click_textdraw 2119 end if 0039: 19@ == 15@ then wait 500 0BCA: samp send_click_textdraw 2120 end end end
Можешь код написать? Кажется я его не осилю.Не выделил память под текст. И строки сравнивай опкодом 0c14.
У тебя весь скрипт не правильно написан. Такое с хуком делать надо.Можешь код написать? Кажется я его не осилю.
Зачем там хуки? Если текст в текстдраве 2116 left, значит надо искать такой же текст в тестдравах 2117-2120 и просто нажать на него. Такое можно же сделать без хуков?У тебя весь скрипт не правильно написан. Такое с хуком делать надо.
{$CLEO}
0000:
while not Samp.Available()
wait 100
end
alloc 15@ = 256
alloc 10@ = 256
alloc 24@ = 256
while true
wait 0
if 0C5D: samp textdraw 2116 is_exists
then
0C5A: samp textdraw 2116 get_string_to 15@
if 0C18: 24@ = strstr string1 15@ string2 "LD_BEAT:up"
then
for 15@ = 2117 to 2120
0C5A: samp textdraw 15@ get_string_to 10@
if 0C18: 24@ = strstr string1 10@ string2 "LD_BEAT:up"
then
wait 500
0BCA: samp send_click_textdraw 15@
end
end
end
if 0C18: 24@ = strstr string1 15@ string2 "LD_BEAT:left"
then
for 15@ = 2117 to 2120
0C5A: samp textdraw 15@ get_string_to 10@
if 0C18: 24@ = strstr string1 10@ string2 "LD_BEAT:left"
then
wait 500
0BCA: samp send_click_textdraw 15@
end
end
end
if 0C18: 24@ = strstr string1 15@ string2 "LD_BEAT:right"
then
for 15@ = 2117 to 2120
0C5A: samp textdraw 15@ get_string_to 10@
if 0C18: 24@ = strstr string1 10@ string2 "LD_BEAT:right"
then
wait 500
0BCA: samp send_click_textdraw 15@
end
end
end
if 0C18: 24@ = strstr string1 15@ string2 "LD_BEAT:down"
then
for 15@ = 2117 to 2120
0C5A: samp textdraw 15@ get_string_to 10@
if 0C18: 24@ = strstr string1 10@ string2 "LD_BEAT:down"
then
wait 500
0BCA: samp send_click_textdraw 15@
end
end
end
end
end