Code: Select all
#include samp-udf.ahk
#include CP.ahk
#IfWinActive, ahk_exe gta_sa.exe
#SingleInstance Force
#NoEnv
if (A_IsAdmin = false)
{
Run *RunAs "%A_ScriptFullPath%" ,, UseErrorLevel
}
ListLines Off
SetBatchLines -1
#SingleInstance, force
#NoEnv
StringCaseSense, Off
global noyname = ""
global chatlog := A_MyDocuments "/RADMIR CRMP User Files/SAMP/chatlog.txt"
global screens := A_MyDocuments "/RADMIR CRMP User Files\SAMP\screens"
global config := A_ScriptDir "\other\config.ini"
global z := 0
global totalans := 0
global totaljail := 0
global totalkick := 0
global totalmute := 0
global totalz := 0
global totalmmut := 0
global totalrmute := 0
global totalban := 0
global totalwarn := 0
IfWinNotExist, GTA:SA:MP
{
msgbox, u vas yest' 1 minuta, chtoby otkryt' igru
process, Wait, gta_sa.exe, 60
Loop
{
if (ErrorLevel == 0) {
msgbox, igra ne otkryta`n`nskript offayetsya
exitapp
}
else {
SetTimer, start, 50
Break
}
}
}
else {
SetTimer, start, 50
}
IfNotExist, other
{
FileCreateDir, other
IfNotExist, other\done
{
FileCreateDir, other\done
IfNotExist, %config%
{
fileappend, , %config%
IniWrite, 1, %config%, config, all
IniWrite, 300, %config%, config, normareport
IniWrite, 20, %config%, config, normajail
IniWrite, 50, %config%, config, normakick
IniWrite, 5, %config%, config, normamute
IniWrite, 50, %config%, config, normaz
IniWrite, 0, %config%, config, autospec
IniWrite, 0, %config%, config, autor
IniWrite, 0, %config%, config, copys
}
}
}
CMD.Register("atinfo","atinfo")
CMD.Register("clearst","clearst")
CMD.Register("gec","gec")
CMD.Register("ass","ass")
CMD.Register("rws","rws")
CMD.Register("unf","unf")
CMD.Register("oskrod","oskrod")
CMD.Register("adm","adm")
CMD.Register("prev","prev")
CMD.Register("now","now")
CMD.Register("mpgun","mpgun")
CMD.Register("setz","setz")
CMD.Register("next","next")
CMD.Register("clea","clea")
exit
setz(zet, zetz) {
z:=zet
z2:=zet2
addChatMessage("{ff87cc}• se: " zet)
addChatMessage("{ff87cc}• tot: " zet2)
sendchat("/z " zet)
}
return
next() {
z += 1
z2 += 1
addChatMessage("{ff87cc}• now: " z)
addChatMessage("{ff87cc}• total: " z2)
sendchat("/z " z)
return
}
There is nothing more to this, nothing else applies.
I need to set 2 values (example: 100, 0). When I switch with the /next command, it should open 101, 102 and etc, and the second value should count the number of openings with the /next command
I can set the value to 600000 instead of 100, but the second value should count the number of openings. Help, tell me the easiest way to do this.
sendchat("/z " zet) This command opens 101,102,103 - works now. It just doesn't count the second value, the value is always = 1.