function sendPunches(amount)
for i=1, amount do
-- Отправляем удар
sampSendChat("/punch")
end
end
function main()
-- Проверяем, нажата ли клавиша NumPad +
if isKeyDown(107) then
-- Запрашиваем количество ударов у пользователя
local amount = sampGetChatInput("", 3)
-- Проверяем, было ли введено число
if amount and tonumber(amount) then
-- Отправляем удары
sendPunches(tonumber(amount))
-- Деактивируем скрипт
thisScript():disable()
end
end
end
-- Активируем скрипт
thisScript():activate()