
@name AR2 RESUPPLY
@persist Scale E:entity
@trigger 
@model models/hunter/blocks/cube1x150x1.mdl
timer("test",5000)

if(first()){
    entity():setAlpha(0)
Scale = 100
E = entity()
holoCreate(1,E:pos(),vec(1,1,1),E:angles(),vec(255,255,255),"models/items/ammocrate_smg2.mdl")
holoModel(1,"models/items/ammocrate_ar2.mdl")
holoPos(1,E:pos() + vec(0,0,-10))
}

if(clk("test")){
    
    



findExcludeClass("*")
findIncludeClass("player")

findInSphere(E:pos(),Scale)

if(find()){
holoAnim(1,1)
stoptimer("test")
H = findClosest(entity():pos())
NAME = H:name()
timer("test3",1500)
timer("test4",2500)
timer("test5",3500)
timer("test6",4500)
timer("test2",5000)
concmd("ulx giveweapon " + NAME + " weapon_ar2")
}
}

if(clk("test2")){G = propSpawn("models/props_phx/mk-82.mdl",E:pos() + vec(0,0,100),1)
G:propBreak()
selfDestructAll()}

if(clk("test3")){
    entity():soundPlay(1000,1000,"buttons/button17.wav")
}

if(clk("test4")){
    entity():soundPlay(1001,1001,"buttons/button17.wav")
    soundPitch(1001,120)
}
if(clk("test5")){
    entity():soundPlay(1001,1001,"buttons/button17.wav")
    soundPitch(1001,140)
}
if(clk("test6")){
    entity():soundPlay(1001,1001,"buttons/button17.wav")
    soundPitch(1001,160)
}



