!2::
ShowDialog(2, "{00FF00}Выберите оружие.", "{FFFFFF}1. Desert eagle", "Ок")
Result := LineResult()
if (!Result)
return
gosub, OrgName%Result%
return
OrgName1:
{
Sleep, 200
showDialog("1", "{00FF00}Выдача оружия.", "{FFFFFF} Введите кол-во патронов.", "X")
input, test, V, {enter}
KeyWait, Enter, D
if (test = 1)
{
Patroni := getDialogText()
playerid := getId()
Pelmen := "/givegun " playerid " 24 " Patroni ""
SendChat(Pelmen)
}
}
return
LineResult()
{
if (!isDialogOpen() || getDialogStyle() = 0 || getDialogStyle() = 1 || getDialogStyle() = 3)
return false
while isDialogOpen()
continue
if GetKeyState("Esc", "P")
return false
return getDialogLineNumber()
}