NoEnv Persistent SingleInstance force Include SAMP-UDF-037-R1 ahk text

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
#NoEnv
#Persistent
#SingleInstance, force
#Include, SAMP-UDF-037-R1.ahk
textArray := [ "Привет"
,"Пока"
,"Как дела?"
,"САМП говно"
,"Дайте диняк"
,"Я люблю слушать скриптонит"]
~F6::
~ESC::
ifWinNotActive, GTA:SA:MP
return
menu := 0
return
~LButton::
Time := A_TickCount
while(isDialogOpen())
{
if (A_TickCount - Time > 500)
return
}
~NumpadEnter::
~Enter::
if (isDialogButtonSelected(1) == 1 || (!IsDialogOpen() && !menu))
menu := 0
ifWinNotActive, GTA:SA:MP
return
if (menu == 1)
{
menu := 0
line_num := getDialogLineNumber()
line_text := getDialogLine(line_num)
addChatMessage("Выбрано: " line_text)
}
return
F2::
Sleep, 100
showDialog(2, "test", gettext(textArray), "X")
menu := 1
return
gettext(array)
{
temptext := ""
for k, v in array
{
temptext .= v "`n"
}
return temptext
}