function playAnim_Resources()
	setPedAnimation(source, "BAR","Barserve_bottle",-1,true,false,false,false)
	setTimer(
		function (source)
			setPedAnimation (source, false)
		end, 3000, 1, source
	)
end
addEvent("playAnim_Resources", true)
addEventHandler("playAnim_Resources", getRootElement(), playAnim_Resources)

function playAnim_Sklad()
	setPedAnimation(source, "BOX","boxshup",-1,true,false,false,false)
	setTimer(
		function (source)
			setPedAnimation (source, false)
		end, 3000, 1, source
	)
end
addEvent("playAnim_Sklad", true)
addEventHandler("playAnim_Sklad", getRootElement(), playAnim_Sklad)

function sborkaPistol()
	setPedAnimation(source, "OTB","betslp_loop",-1,true,false,false,false)
	setTimer(
		function (source)
			setPedAnimation (source, false)
			giveWeapon(source, 22)
            setPedWeaponSlot(source, 2)
		end, pistol_time, 1, source
	)
end
addEvent("sborkaPistol", true)
addEventHandler("sborkaPistol", getRootElement(), sborkaPistol)

function sborkaPP()
	setPedAnimation(source, "OTB","betslp_loop",-1,true,false,false,false)
	setTimer(
		function (source)
			setPedAnimation (source, false)
			giveWeapon(source, 32)
            setPedWeaponSlot(source, 4)
		end, autopistol_time, 1, source
	)
end
addEvent("sborkaPP", true)
addEventHandler("sborkaPP", getRootElement(), sborkaPP)

function sborkaAutomat()
	setPedAnimation(source, "OTB","betslp_loop",-1,true,false,false,false)
	setTimer(
		function (source)
			setPedAnimation (source, false)
			giveWeapon(source, 30)
            setPedWeaponSlot(source, 5)
		end, auto_time, 1, source
	)
end
addEvent("sborkaAutomat", true)
addEventHandler("sborkaAutomat", getRootElement(), sborkaAutomat)

function sborkaSniper()
	setPedAnimation(source, "OTB","betslp_loop",-1,true,false,false,false)
	setTimer(
		function (source)
			setPedAnimation (source, false)
			giveWeapon(source, 34)
            setPedWeaponSlot(source, 6)
		end, sniper_time, 1, source
	)
end
addEvent("sborkaSniper", true)
addEventHandler("sborkaSniper", getRootElement(), sborkaSniper)

function weaponTakePlayer()
    takeWeapon(source, 22)
	takeWeapon(source, 32)
	takeWeapon(source, 30)
	takeWeapon(source, 34)
end
addEvent("weaponTakePlayer", true)
addEventHandler("weaponTakePlayer", getRootElement(), weaponTakePlayer)

function giveMoneyWeaponjob(player, summa)
    local state = getElementData(player,"job_weapon:onwork")
    if state then
        givePlayerMoney(player, summa)
		outputChatBox("Вы завершили работу.",player,255,255,255,true)
        outputChatBox("Заработанно: #7979dc"..summa.." #FFFFFFруб.",player,255,255,255,true)
    end
end
addEvent("giveMoneyWeaponjob", true)
addEventHandler("giveMoneyWeaponjob", getRootElement(), giveMoneyWeaponjob) 

function onPlayerWasted()
    giveMoneyWeaponjob(source)
end
addEventHandler("onPlayerWasted", getRootElement(), onPlayerWasted)

function onPlayerQuit()
    giveMoneyWeaponjob(source)
end
addEventHandler("onPlayerQuit", getRootElement(), onPlayerQuit)