SingleInstance force NoEnv IfWinActive GTA SA MP ListLines Off SetBatc

 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
#SingleInstance force
#NoEnv
#IfWinActive GTA:SA:MP
ListLines Off
SetBatchLines -1
SetKeyDelay 0
;~ =================================================================================================
;.ini
IniRead, countTrening, setting.ini, SETTING, countTrening, 0
;~ =================================================================================================
!vk4C::
:*:/rp+::
cmd_rp:
countTrening++
IniWrite, % countTrening, setting.ini, SETTING, countTrening
SendChat("/rp+ " param1 " " strrest(cmd, 2))
sleep 500
addChatMessageEx(FFFFFF, "{FFF500}[!] [AHK] К выполненым тренировкам прибавлена единица, сейчас выполнено = " countTrening)
SendInput, % countTrening
return
; # к функциям добавить
strrest(cmd, n)
{
str := ""
for k, v in cmd
if (k > n)
str := str "" v " "
return SubStr(str, 1, -1)
}