function ev.onShowDialog(dialogId, style, title, button1, button2, text)
if act then
if string.match(title, "Амбар") and semena then
sampSendDialogResponse(15161, 1, 0, -1)
end
if string.match(title, "Амбар") and instrumenti then
sampSendDialogResponse(15161, 1, 1, -1)
end
if dialogId == 15162 and givevedro then
sampSendDialogResponse(15162, 1, 2, -1)
givevedro = false
instrumenti = false
ruka=true
end
if dialogId == 15162 and givelopata then
sampSendDialogResponse(15162, 1, 0, -1)
givelopata = false
instrumenti = false
ruka=true
end
if dialogId == 15162 and givegrab then
sampSendDialogResponse(15162, 1, 1, -1)
givegrab = false
instrumenti = false
ruka=true