NumpadEnter Enter If isInChat isDialogOpen Sleep 250 tempText readStri

 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
$~NumpadEnter::
$~Enter::
If (isInChat() = 1 && isDialogOpen() = 0)
{
Sleep 250
tempText := readString(hGTA, dwSAMP + 0x122EF8, 256)
tempCmd := StrSplit(tempText, A_Space)[1]
if (tempCmd == "/ogran")
{
if (RegExMatch(tempText, "^" tempCmd "\s+(\d{1,3})", chatInput))
{
global num := chatInput1
Sleep, 100
addChatMessageEx("FFFFFF", "Ограничение выставленно на {00FF00}" num "{FFFFFF} тп.")
}
Else
{
Sleep, 100
addChatMessageEx("FF0000", "Ошибка! Используй: " tempCmd " [количество]")
}
}
if (tempCmd == "/info")
{
if (RegExMatch(tempText, "^" tempCmd "\s+(.*)", chatInput))
{
global num := chatInput1
Sleep, 100
addChatMessageEx("FFFFFF", "id: " serchNickInChatlog(chatInput1))
}
Else
{
Sleep, 100
addChatMessageEx("FF0000", "Ошибка! Используй: " tempCmd " [количество]")
}
}
}