local launch = 0 local delay = 3000 function shoot_barrel_test_init(e) end function shoot_barrel_test_main(e) if g_Entity[e]['health'] < 500 and launch == 0 then ActivateIfUsed(e) if GetTimer(e) >= delay then launch = 1 PlaySound(e,0) end else StartTimer(e) end if launch == 1 then CollisionOff(e) StartParticleEmitter(e) MoveUp(e,500) RotateX(e,600) RotateZ(e,400) RotateY(e,300) if x == x then MoveForward(e,1000) end if GetPlayerDistance(e) > 3000 then SetEntityHealth(e,0) Destroy(e) CollisionOn(e) StopSound(e,0) StopParticleEmitter(e) end end end